gfx/2d/RadialGradientEffectD2D1.cpp(162): warning C4838: conversion from 'int' to 'float' requires a narrowing conversion

RESOLVED FIXED in Firefox 48

Status

()

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: gps, Unassigned)

Tracking

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

(Whiteboard: gfx-noted)

Attachments

(1 attachment, 2 obsolete attachments)

This warning is turned into an error when compiling on Visual Studio 2015 Update 1 in automation.
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
this patch never lands because someone insists on fixing the underlying
problem instead. But if it does land, hopefully the workaround is
only temporary.

Review commit: https://reviewboard.mozilla.org/r/39989/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/39989/
Attachment #8730548 - Flags: review?(jmuizelaar)
Comment on attachment 8730548 [details]
MozReview Request: Bug 1256552 - Disable C4838 to unblock compilation on VS2015; r?jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/39989/diff/1-2/
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
this patch never lands because someone insists of fixing the underlying
problem instead. But if it does land, hopefully the workaround is
only temporary.

Review commit: https://reviewboard.mozilla.org/r/40001/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40001/
Attachment #8730561 - Flags: review?(jmuizelaar)
Can you post the compile warnings/errors that these fix so that we have a better chance of fixing them properly?
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef4999fe0980 should unmask the warnings. It may not get all of them because build will fail after first warning turned error. But you should be able to pull down that head (hg pull -r 388e18377a7f https://hg.mozilla.org/try) and test your changes on top of that.
So far we only found 1 warning turned error:

 10:41:40     INFO -  c:/builds/moz2_slave/try-w32-d-00000000000000000000/build/src/gfx/2d/RadialGradientEffectD2D1.cpp(162): error C2220: warning treated as error - no 'object' file generated
 10:41:40     INFO -  Warning: C4838 in c:\builds\moz2_slave\try-w32-d-00000000000000000000\build\src\gfx\2d\RadialGradientEffectD2D1.cpp: conversion from 'int' to 'float' requires a narrowing conversion
 10:41:40     INFO -  c:/builds/moz2_slave/try-w32-d-00000000000000000000/build/src/gfx/2d/RadialGradientEffectD2D1.cpp(162): warning C4838: conversion from 'int' to 'float' requires a narrowing conversion
 10:41:40     INFO -  c:/builds/moz2_slave/try-w32-d-00000000000000000000/build/src/gfx/2d/RadialGradientEffectD2D1.cpp(162): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
10:41:40 INFO - c:/builds/moz2_slave/try-w32-d-00000000000000000000/build/src/config/rules.mk:918: recipe for target 'RadialGradientEffectD2D1.obj' failed

There /might/ be more. But we won't know until this is patched.
Whiteboard: gfx-noted
Attachment #8732967 - Flags: review?(jmuizelaar) → review+
Attachment #8730548 - Attachment is obsolete: true
Attachment #8730548 - Flags: review?(jmuizelaar)
Attachment #8730561 - Attachment is obsolete: true
Attachment #8730561 - Flags: review?(jmuizelaar)
https://hg.mozilla.org/mozilla-central/rev/30cc10b99593
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.