Skip to content

Commit

Permalink
Disable unreachable-code build errors.
Browse files Browse the repository at this point in the history
We patch code in places by immediately returning from functions/methods,
which causes ureachable-code errors.

Chromium changes:

3afe3d815b02 Enable -Wunreachable-code for internal iOS builds.
16249b38f48a Reland "Enable -Wunreachable-code in iOS builds (except for internal builds)."
18926aac4b17 Revert "Enable -Wunreachable-code in iOS builds (except for internal builds)."
a7b569e6be6a Enable -Wunreachable-code in iOS builds (except for internal builds).
1add1c909d19 Enable -Wunreachable-code in Mac builds.
eb5502886733 Wunreachable-code: List target_os that do not use the flag, instead of the ones that do.
e44258cbf461 Enable -Wunreachable-code for win/asan.
fa18fef1b31a Reland "Enable -Wunreachable-code on Windows."
6d6956573c0e Revert "Enable -Wunreachable-code on Windows."
e334b16ecf68 Enable -Wunreachable-code on Windows.
8a3cdc59b72d Reland "Enable -Wunreachable-code on Android."
eea1e99dfa7e Revert "Enable -Wunreachable-code on Android."
4a5118005a89 Enable -Wunreachable-code on Android.
72f3015c3b88 Reland "Enable -Wunreachable-code in Chrome OS builds."
451c0a00e417 Revert "Enable -Wunreachable-code in (non-arm) Chrome OS builds."
2ff5fdbc7071 Enable -Wunreachable-code in (non-arm) Chrome OS builds.
057808f1be13 Reland "Enable -Wunreachable-code in Fuchsia builds."
66d981c07546 Revert "Enable -Wunreachable-code in Fuchsia builds."
ec7d2855c15a Enable -Wunreachable-code in Fuchsia builds.
d9d917c05c2a Enable Wunreachable-code for chromium_code on Linux.
  • Loading branch information
mkarolin committed Apr 4, 2020
1 parent 3de9217 commit c5cf892
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patches/build-config-compiler-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 3d5e4dede0ba6f01b5d002e46e835a16b6eb3a45..27fb13271336fb1e245321513b5041743c936e80 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1593,6 +1593,7 @@ config("chromium_code") {
# use_libfuzzer: https://crbug.com/1063180
if (!is_nacl && !use_libfuzzer) {
cflags += [ "-Wunreachable-code" ]
+ cflags -= [ "-Wunreachable-code" ]
}

# Thread safety analysis is broken under nacl: https://crbug.com/982423.

0 comments on commit c5cf892

Please sign in to comment.