--enable-warnings-as-errors and --disable-unified-build causes -Werror=unreachable-code in modules/libmar/verify/mar_verify.c
Categories
(Toolkit :: Application Update, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: jgilbert, Assigned: jgilbert, NeedInfo)
Details
Attachments
(2 files)
4:53.74 /git/gecko1/modules/libmar/verify/mar_verify.c:143:5: error: code will never be executed [-Werror,-Wunreachable-code]
4:53.74 143 | fprintf(stderr, "ERROR: Could not init crytpo library.\n");
4:53.74 | ^~~~~~~
4:53.74 1 error generated.
Assignee | ||
Comment 1•10 days ago
|
||
With:
--enable-warnings-as-errors
--disable-unified-build
4:53.74 /git/gecko1/modules/libmar/verify/mar_verify.c:143:5: error: code will never be executed [-Werror,-Wunreachable-code]
4:53.74 143 | fprintf(stderr, "ERROR: Could not init crytpo library.\n");
4:53.74 | ^~~~~~~
4:53.74 1 error generated.
So convert the macro to function, which makes the compiler happy.
Assignee | ||
Comment 2•10 days ago
|
||
Comment 3•6 days ago
|
||
Hi Kelsey! For the context: Can you please link the code to the issue causing unreachable lines or has there been a recent CI enforcement of avoiding unreachable code and can we link that bug where it was introduced?
Assignee | ||
Comment 5•5 days ago
|
||
(In reply to Max Christian Pohle [:/dev/max] from comment #3)
Hi Kelsey! For the context: Can you please link the code to the issue causing unreachable lines or has there been a recent CI enforcement of avoiding unreachable code and can we link that bug where it was introduced?
This is not CI, this is on my local linux machine. My best guess is that we only build CI with either --enable-warnings-as-errors
xor --disable-unified-build
, but never both.
It is kinda suspect that this causes issues with non-unified builds, because that probably means there's a #define or #ifdef interaction that's happening differently in the two builds. However, I need to leave this investigation to a code owner. (FYI @sylvestre)
Assignee | ||
Comment 6•5 days ago
|
||
Actually wait, you are the triage owner! I'm happy to help you try to replicate it for yourself! But you should merely need to build on Linux with those two options in your .mozconfig
.
Here is my complete .mozconfig
though:
[gitsh@duat gecko1]$ cat .mozconfig
ac_add_options --disable-debug
ac_add_options --disable-optimize
ac_add_options --enable-warnings-as-errors
ac_add_options --enable-debug
#ac_add_options --enable-optimize
ac_add_options --disable-unified-build
[gitsh@duat gecko1]$
Comment 7•5 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e06aae14caf6
https://hg.mozilla.org/mozilla-central/rev/600681873cdb
Description
•