]> granicus.if.org Git - libvpx/commitdiff
add -Wmissing-prototypes
authorJohann <johannkoenig@google.com>
Tue, 5 Mar 2019 00:55:10 +0000 (16:55 -0800)
committerJohann <johannkoenig@google.com>
Tue, 5 Mar 2019 02:02:09 +0000 (18:02 -0800)
clang treats -Wmissing-declarations differently than gcc. This
provides similar coverage for clang.

Fix vpx_clear_system_state() warning on 32bit builds:
  note: this declaration is not a prototype; add 'void' to make it a
  prototype for a zero-parameter function

Change-Id: I5a424bc38d47c0a3dc751d65c1efea5733907785

configure
vpx_ports/system_state.h

index b5096723b340acefa3e9b0b7709372919aa32ec0..2174544c30873314becbcf1d5674264cc64f95df 100755 (executable)
--- a/configure
+++ b/configure
@@ -627,6 +627,8 @@ process_toolchain() {
           add_cflags_only -Wframe-larger-than=52000
         check_cflags -Wmissing-declarations && \
           add_cflags_only -Wmissing-declarations
+        check_cflags -Wmissing-prototypes && \
+          add_cflags_only -Wmissing-prototypes
         if enabled mips || [ -z "${INLINE}" ]; then
           enabled extra_warnings || check_add_cflags -Wno-unused-function
         fi
index 03557e4bd73a89051060a5a3b0311b914aef2d79..452cb5739bff0c02db444f2cfbefb19f0088293d 100644 (file)
@@ -18,7 +18,7 @@ extern "C" {
 #endif
 
 #if (ARCH_X86 || ARCH_X86_64) && HAVE_MMX
-extern void vpx_clear_system_state();
+extern void vpx_clear_system_state(void);
 #else
 #define vpx_clear_system_state()
 #endif  // (ARCH_X86 || ARCH_X86_64) && HAVE_MMX