Port bug 1766377 - Fix sign-compare warnings on Windows builds
Categories
(Thunderbird :: Upstream Synchronization, task)
Tracking
(thunderbird_esr91 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | unaffected |
People
(Reporter: rjl, Assigned: rachel)
References
Details
Attachments
(2 files, 2 obsolete files)
-Wsign-compare (and -Werror) is now turned on for Windows builds via bug 1762484.
This is a particular gem:
uint32_t dwordResult = -1;
Reporter | ||
Comment 1•2 years ago
|
||
Some of these could probably be cast easily enough, but as they say, "here there
be dragons". It's safer to selectively disable the warning-as-error on the
affected files pending closer examination.
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/6c21051a5d7f Disable sign-compare warnings on select files. rs=bustage-fix
Comment 3•2 years ago
|
||
I had to revert the change on mailnews/mapi/mapiDll/moz.build to get it built locally. Is where a setting to get it working?
I see now that the Windows localised builds have the same issue.
Reporter | ||
Comment 4•2 years ago
|
||
Looks like if you're not building with --enable-warnings-as-errors
my fix didn't work.
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/c8476a107c16 Follow-up: Fix for builds not using --enable-warnings-as-errors. rs=bustage-fix
Comment 6•2 years ago
|
||
Yes, works now. Thanks!
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 9•2 years ago
|
||
While reviewing, I noticed:
warning: comm/mail/components/search/wsenable/WSEnable.cpp:72:44 [-Wsign-compare] comparison of integers of different signs: 'int' and 'unsigned long long'
warning: comm/mail/components/search/wsenable/WSEnable.cpp:108:46 [-Wsign-compare] comparison of integers of different signs: 'int' and 'unsigned long long'
These don't result in an error because of AllowCompilerWarnings()
in the moz.build file.
Assignee | ||
Comment 10•2 years ago
|
||
OK, fixed those as well.
Reporter | ||
Comment 11•2 years ago
|
||
Fix-up the moz.build file for WSEnable.exe.
Comment 12•2 years ago
|
||
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/5a58b0784f31
Fix no-sign-compare warnings. r=rjl
Comment 13•2 years ago
|
||
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/comm-central/rev/f6d775b9b58d Follow-up: Fix clang-format. rs=clang-format
Updated•2 years ago
|
Description
•