Closed
Bug 1012860
Opened 10 years ago
Closed 10 years ago
MSVC build warning: WidgetUtils.cpp(22) : warning C4305: 'argument' : truncation from 'double' to 'mozilla::gfx::Float'
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
1.48 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Our TBPL Windows builds currently hit these build warnings: { c:\builds\moz2_slave\try-w32-d-00000000000000000000\build\widget\xpwidgets\WidgetUtils.cpp(22) : warning C4305: 'argument' : truncation from 'double' to 'mozilla::gfx::Float' c:\builds\moz2_slave\try-w32-d-00000000000000000000\build\widget\xpwidgets\WidgetUtils.cpp(26) : warning C4305: 'argument' : truncation from 'double' to 'mozilla::gfx::Float' c:\builds\moz2_slave\try-w32-d-00000000000000000000\build\widget\xpwidgets\WidgetUtils.cpp(30) : warning C4305: 'argument' : truncation from 'double' to 'mozilla::gfx::Float' } I believe these are from passing M_PI (a #define for pi, implicitly a double) in to a function that accepts a gfx::Float (a float). Filing this bug to fix these (by making the conversion explicit with static_cast.)
Assignee | ||
Comment 1•10 years ago
|
||
Haven't tested this on Windows yet, but I expect this should fix the problem. Will request review after I've confirmed that.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
(just fixing a whitespace issue from earlier patch)
Attachment #8425055 -
Attachment is obsolete: true
Assignee | ||
Comment 3•10 years ago
|
||
Hooray -- the Try run is green, and 'grep' confirms that there are no warnings for xpwidgets in the log. I'm posting this new version of the patch to fix the bug # in commit message (I copypasted the wrong bug # into the last one), and requesting review.
Attachment #8425056 -
Attachment is obsolete: true
Attachment #8425088 -
Flags: review?(roc)
Assignee | ||
Comment 4•10 years ago
|
||
For the record, the Try run with this is: https://tbpl.mozilla.org/?tree=Try&rev=b3276cad96e9 (This bug's patch is the middle cset there -- mistakenly labeled in the commit message as being for bug 1012858)
Comment on attachment 8425088 [details] [diff] [review] fix v3 Review of attachment 8425088 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/xpwidgets/WidgetUtils.cpp @@ +13,5 @@ > ComputeTransformForRotation(const nsIntRect& aBounds, > ScreenRotation aRotation) > { > gfx::Matrix transform; > + static gfx::Float floatPi = static_cast<gfx::Float>(M_PI); static const
Attachment #8425088 -
Flags: review?(roc) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Will add 'const' before landing. Thanks!
Assignee | ||
Comment 7•10 years ago
|
||
Landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/2940750f68ea
Flags: in-testsuite-
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2940750f68ea
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•