Closed
Bug 1498958
(Wtautological-unsigned-zero-compare)
Opened 7 years ago
Closed 7 years ago
Enable clang warnings: -Wtautological-unsigned-zero-compare, -Wtautological-unsigned-enum-zero-compare
Categories
(Firefox Build System :: General, enhancement, P3)
Firefox Build System
General
Tracking
(firefox-esr60 wontfix, firefox62 wontfix, firefox63 wontfix, firefox64 fixed)
RESOLVED
FIXED
mozilla64
People
(Reporter: cpeterson, Assigned: cpeterson)
References
Details
Attachments
(1 file)
With the update to clang 7 (in bug 1492663), some new warning options are available. The following options report some warnings in third-party code (ICU) that is not compiled with warnings-as-errors, so we can enable them by default:
-Wtautological-unsigned-zero-compare: result of comparison of unsigned expression is always true/false
https://clang.llvm.org/docs/DiagnosticsReference.html#wtautological-unsigned-zero-compare
-Wtautological-unsigned-enum-zero-compare: result of comparison of unsigned enum expression is always true/false
https://clang.llvm.org/docs/DiagnosticsReference.html#wtautological-unsigned-enum-zero-compare
intl/icu/source/common/utrie2.cpp:145:18 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/common/utrie2.cpp:251:17 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/common/utrie2.cpp:466:18 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/common/utrie2_builder.cpp:1266:18 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/i18n/numfmt.cpp:1306:15 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/i18n/reldatefmt.cpp:551:27 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression >= 0 is always true
intl/icu/source/i18n/tmunit.cpp:64:23 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/i18n/unum.cpp:782:27 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
intl/icu/source/i18n/unum.cpp:809:27 [-Wtautological-unsigned-enum-zero-compare] comparison of unsigned enum expression < 0 is always false
| Assignee | ||
Comment 1•7 years ago
|
||
-Wtautological-unsigned-zero-compare: result of comparison of unsigned expression is always true/false
https://clang.llvm.org/docs/DiagnosticsReference.html#wtautological-unsigned-zero-compare
-Wtautological-unsigned-enum-zero-compare: result of comparison of unsigned enum expression is always true/false
https://clang.llvm.org/docs/DiagnosticsReference.html#wtautological-unsigned-enum-zero-compare
Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/46c013fd9f6a
Enable clang warnings: -Wtautological-unsigned-zero-compare, -Wtautological-unsigned-enum-zero-compare. r=glandium
Comment 3•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•