Closed Bug 1733034 Opened 3 years ago Closed 3 years ago

Enable warnings as errors on CI hybrid (non-unified) builds

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(12 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
^

dom/base/BodyStream.cpp:21:22: error: unused variable 'kStreamTransportServiceCID' [-Werror,-Wunused-const-variable]
static NS_DEFINE_CID(kStreamTransportServiceCID, NS_STREAMTRANSPORTSERVICE_CID);
^

dom/media/autoplay/AutoplayPolicy.cpp:38:23: error: unused variable 'sPOLICY_TRANSIENT_ACTIVATION' [-Werror,-Wunused-const-variable]
static const uint32_t sPOLICY_TRANSIENT_ACTIVATION = 1;
^

dom/security/nsCSPContext.cpp:80:23: error: unused variable 'CSP_CACHE_URI_CUTOFF_SIZE' [-Werror,-Wunused-const-variable]
static const uint32_t CSP_CACHE_URI_CUTOFF_SIZE = 512;
^
dom/security/test/gtest/TestFilenameEvalParser.cpp:25:23: error: unused variable 'kDataUriWebExtCStyle' [-Werror,-Wunused-const-variable]
static constexpr auto kDataUriWebExtCStyle =
^
dom/security/test/gtest/TestFilenameEvalParser.cpp:29:23: error: unused variable 'kOtherExtensionFile' [-Werror,-Wunused-const-variable]
static constexpr auto kOtherExtensionFile = "otherextension_file"_ns;
^
dom/security/test/gtest/TestFilenameEvalParser.cpp:37:23: error: unused variable 'kOtherWorker' [-Werror,-Wunused-const-variable]
static constexpr auto kOtherWorker = "other-on-worker"_ns;
^
dom/security/test/gtest/TestFilenameEvalParser.cpp:38:23: error: unused variable 'kRegexFailure' [-Werror,-Wunused-const-variable]
static constexpr auto kRegexFailure = "regexfailure"_ns;
^

dom/console/Console.cpp:2899:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return 0;
^
dom/console/Console.cpp:2955:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return 0;
^
dom/fetch/FetchDriver.cpp:252:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return NS_OK;
^~~~~

dom/media/mediacontrol/MediaStatusManager.cpp:260:13: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return u""_ns;
^~~

gfx/layers/opengl/CompositorOGL.cpp:1624:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return true;
^~~~

dom/media/gtest/TestMediaDataEncoder.cpp:199:16: error: code will never be executed [-Werror,-Wunreachable-code]
result = Some(false);
^

FAIL() expands to an expression that starts with return, so the code
coming after it never runs.

dom/quota/test/gtest/TestFlatten.cpp:18:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
for (const auto& item : Flatten<int>(nsTArray<int>{})) {
^~~
dom/quota/test/gtest/TestFlatten.cpp:26:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
for (const auto& item : Flatten<int>(nsTArray<CopyableTArray<int>>{})) {
^~~
dom/quota/test/gtest/TestFlatten.cpp:34:3: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
for (const auto& item :
^~~

clang figures out that the loop is not going to execute, which is the
whole point of the test.

extensions/permissions/PermissionManager.cpp:2468:12: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
return NS_OK;
^~~~~

dom/base/CustomElementRegistry.cpp:580:56: error: loop will run at most once (loop increment never executed) [-Werror,-Wunreachable-code-loop-increment]
for (auto iter = mCandidates.Iter(); !iter.Done(); iter.Next()) {
^~~~~~~~~~~

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/2137f96cc55a
Fix unused*-variable warnings due to missing ifdefs. r=andi
https://hg.mozilla.org/integration/autoland/rev/404fb8230906
Fix unused-const-variable warning in dom/base/BodyStream.cpp. r=smaug
https://hg.mozilla.org/integration/autoland/rev/2aa15daba9d0
Fix unused-const-variable warning in dom/media. r=padenot
https://hg.mozilla.org/integration/autoland/rev/f7e7d86b87ab
Fix unused-const-variable warnings in dom/security. r=freddyb
https://hg.mozilla.org/integration/autoland/rev/8c3f0dca8a03
Fix unreachable-code-return warnings in dom. r=smaug
https://hg.mozilla.org/integration/autoland/rev/97c121cca055
Fix unreachable-code-return warning in dom/media. r=padenot
https://hg.mozilla.org/integration/autoland/rev/a832d53346d9
Fix unreachable-code-return warning in gfx. r=gfx-reviewers,nical
https://hg.mozilla.org/integration/autoland/rev/ac01fab10fe4
Fix unreachable-code warning in dom/media. r=padenot
https://hg.mozilla.org/integration/autoland/rev/70cef65d41d7
Ignore unreachable-code-loop-increment in TestFlatten. r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/8bdaa61a65d9
Ignore unreachable-core-return in PermissionManager.cpp. r=baku
https://hg.mozilla.org/integration/autoland/rev/a1ea20d022f7
Fix unreachable-code-loop-increment warning in dom. r=smaug
https://hg.mozilla.org/integration/autoland/rev/95ddc09e8e1f
Enable warnings as errors on CI hybrid (non-unified) builds. r=firefox-build-system-reviewers,andi
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: