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)