Stepping back: [
This issue is really a special case of "This patch compiles fine in my
local configuration, but it busts the build for $OTHER_PLATFORM".
The general solution to this class of problems is a try push, with
builds on at least one platform other than your local config (if not all
platforms). That should catch the vast majority of these cases (both
warning-related and non-warning-related), and I think it's reasonable to
expect that non-trivial patches should generally receive a try push
along those lines before landing.
]
Now -- for the specific point you brought up about MSVC being excluded
from FAIL_ON_WARNINGS in some directories -- that indeed is undesirable,
and makes it much easier to hit this sort of thing for non-try-tested
pushes. (Usually the MSVC exemption is there because of MSVC-only
warnings for double --> float or float --> int conversions, which we
apparently run afoul of all over the place :-/ )
I absolutely agree we should do something to address those and remove
the MSVC-special-casing there. Ideally we'd fix the code so it doesn't
warn, but that's not easy and maybe not necessary in many cases where
this warning might be a false-positive.
IMHO, the sanest way to address this specific issue would be to use
compiler flags to force the spammiest MSVC-only warnings to be treated
as warnings (not errors), even in FAIL_ON_WARNINGS directories. We
already do this for at least one GCC warning (-Wuninitialized, which has
a lot of false positives.)
With this change, we could remove most/all of the MSVC exemptions and
get MSVC build-warning-coverage in those directories, so you'd be better
able to locally catch future instances of this sort of issue.
Would that address your concerns?
~Daniel
P.S. Just to provide the relevant keywords, for MXR searchability &
completeness for anyone who's missing the context here:
* --enable-warnings-as-errors is the mozconfig option that will make
your build treat warnings as errors, for any opted-in directories.
* FAIL_ON_WARNINGS is the Makefile variable used to opt-in directories.
> _______________________________________________
> dev-platform mailing list
>
dev-pl...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-platform
>