commit | 5a14a66ac5c66cfa11a043e439964c4651bd7c6e | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Mon Mar 08 11:22:02 2021 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Mar 19 01:03:15 2021 +0000 |
tree | 272924ce8c015b5678739e5dd4baeb2ce274cc14 | |
parent | c2ce5245990b254c9e67c15031c6b79f81388633 [diff] |
build: Apply -Wstrict-prototypes to C code The -Wstrict-prototypes warning ensures C prototypes for functions without parameters correctly use void. Fixed: 329 Requires: pigweed-internal:10940 Change-Id: I45f02dd0e81583c2497ea06859908aa0fcaf8e12 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/36241 Commit-Queue: Wyatt Hepler <hepler@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_build/BUILD.gn b/pw_build/BUILD.gn index 7c4be4a..777ef22 100644 --- a/pw_build/BUILD.gn +++ b/pw_build/BUILD.gn
@@ -95,6 +95,7 @@ "-Wshadow", "-Wredundant-decls", ] + cflags_c = [ "-Wstrict-prototypes" ] } config("cpp11") {
diff --git a/pw_build/CMakeLists.txt b/pw_build/CMakeLists.txt index b2eeef0..602dd4a 100644 --- a/pw_build/CMakeLists.txt +++ b/pw_build/CMakeLists.txt
@@ -71,6 +71,7 @@ INTERFACE "-Wshadow" "-Wredundant-decls" + $<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes> ) add_library(pw_build.cpp17 INTERFACE)