Bug 1389851 - build: Enable clang's -Wunreachable-code-return warnings. r=glandium
authorChris Peterson <cpeterson@mozilla.com>
Tue, 08 Aug 2017 23:12:41 -0700
changeset 375802 8b998ade630a9dc21d313b081c082c7d508ad6e7
parent 375801 4d3165f35b0c044871534c26fe345e21df283d95
child 375803 ef38fd38b435f3d4d5f29d27235326785794cce3
push id32362
push userphilringnalda@gmail.com
push dateSat, 19 Aug 2017 22:29:29 +0000
treeherdermozilla-central@5ca5691372cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1389851
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1389851 - build: Enable clang's -Wunreachable-code-return warnings. r=glandium MozReview-Commit-ID: 8Zl0mbzcFBm
build/moz.configure/warnings.configure
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -37,16 +37,17 @@ add_gcc_warning('-Wpointer-arith')
 # catches comparing signed/unsigned ints
 add_gcc_warning('-Wsign-compare')
 
 # catches overflow bugs, few false positives
 add_gcc_warning('-Wtype-limits')
 
 # catches some dead code
 add_gcc_warning('-Wunreachable-code')
+check_and_add_gcc_warning('-Wunreachable-code-return')
 
 # catches treating string literals as non-const
 add_gcc_warning('-Wwrite-strings', cxx_compiler)
 
 # turned on by -Wall, but we use offsetof on non-POD types frequently
 add_gcc_warning('-Wno-invalid-offsetof', cxx_compiler)
 
 # catches objects passed by value to variadic functions.