Bug 1389851 - sandbox: Suppress -Wunreachable-code-return warning in third-party Chromium sandbox code. r?jld
security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc:277:12: warning: 'return' will never be executed [-Wunreachable-code-return]
This return statement is unreachable because SANDBOX_DIE() is a noreturn function:
https://searchfox.org/mozilla-central/rev/a887f0edbd9f6b176b64111455ba62bb0cf356a6/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc#270-274
MozReview-Commit-ID: HDxBJe2ZtPN
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -77,19 +77,20 @@ if CONFIG['MOZ_GMP_SANDBOX']:
'SandboxOpenedFiles.cpp',
]
# This copy of SafeSPrintf doesn't need to avoid the Chromium logging
# dependency like the one in libxul does, but this way the behavior is
# consistent. See also the comment in SandboxLogging.h.
SOURCES['../chromium/base/strings/safe_sprintf.cc'].flags += ['-DNDEBUG']
-# Keep clang from warning about intentional 'switch' fallthrough in icu_utf.cc:
if CONFIG['CLANG_CXX']:
+ # Keep clang from warning about intentional 'switch' fallthrough in icu_utf.cc:
SOURCES['../chromium/base/third_party/icu/icu_utf.cc'].flags += ['-Wno-implicit-fallthrough']
+ SOURCES['../chromium/sandbox/linux/seccomp-bpf/trap.cc'].flags += ['-Wno-unreachable-code-return']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-shadow']
SOURCES['../chromium/sandbox/linux/services/syscall_wrappers.cc'].flags += [
'-Wno-empty-body',
]
# gcc lto likes to put the top level asm in syscall.cc in a different partition