gfxFont.h(2080) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data

RESOLVED FIXED in mozilla18

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla18
x86_64
Windows 7
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When I build debug build on Win7 with VC2010, I can see this warning for a long while:

> gfxFont.h(2080) : warning C4244: 'return' : conversion from 'double' to 'float', possible loss of data

http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxFont.h#2079

Looks like the 1.0 and -1.0 should be 1.0f and -1.0f. Or the result type should be integer.
Created attachment 662381 [details] [diff] [review]
Patch

The only user of the method is here:
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxUniscribeShaper.cpp#289

I think that the result type should be kept as float.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #662381 - Flags: review?(jfkthame)
Blocks: 703100
Comment on attachment 662381 [details] [diff] [review]
Patch

Review of attachment 662381 [details] [diff] [review]:
-----------------------------------------------------------------

Fine, thanks. (What a silly warning - the compiler can see it's a constant and won't lose anything...)
Attachment #662381 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/6727fcb41025

Yeah, it's odd... But anyway, thank you for your review.
status-firefox18: --- → affected
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/6727fcb41025
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED

Updated

6 years ago
status-firefox18: affected → ---
You need to log in before you can comment on or make changes to this bug.