build: renable -Wstrict-prototypes compiler warning
authorThomas Haller <thaller@redhat.com>
Wed, 29 Oct 2014 11:59:51 +0000 (12:59 +0100)
committerThomas Haller <thaller@redhat.com>
Wed, 29 Oct 2014 13:09:52 +0000 (14:09 +0100)
The warning -Wstrict-prototypes was disabled by commit
db9b1df0e47996ff8aaea468a11e1e97f64ee126 .

Enable it again, but avoid warnings for WiMax SDK by explicitly disabling the
compiler warning where needed.

Apparently clang does not produce a warning for -Wstrict-prototypes,
hence we don't need a clang specific #pragma.

Signed-off-by: Thomas Haller <thaller@redhat.com>
m4/compiler_warnings.m4
src/devices/wimax/iwmxsdk.c
src/devices/wimax/iwmxsdk.h
src/devices/wimax/nm-device-wimax.c
src/devices/wimax/nm-wimax-util.c
src/devices/wimax/nm-wimax-util.h

index 79d2cbf..3fde795 100644 (file)
@@ -25,6 +25,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
        for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
                      -Wdeclaration-after-statement -Wformat-security \
                      -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
+                     -Wstrict-prototypes \
                      -fno-strict-aliasing -Wno-unused-but-set-variable \
                      -Wundef -Wimplicit-function-declaration \
                      -Wpointer-arith -Winit-self \
index e6b54d8..2508088 100644 (file)
@@ -31,7 +31,8 @@
 
 #include <glib.h>
 
-#include <WiMaxType.h>
+#include "nm-wimax-util.h"
+
 #include <WiMaxAPI.h>
 #include <WiMaxAPIEx.h>
 
index 9a1b819..c8e7669 100644 (file)
@@ -22,7 +22,8 @@
 #ifndef __IWMXSDK_H__
 #define __IWMXSDK_H__
 
-#include <wimax/WiMaxType.h>
+#include "nm-wimax-util.h"
+
 #include <wimax/WiMaxTypesEx.h>
 #include <wimax/WiMaxAPIEx.h>
 
index ec892b6..34c2d2a 100644 (file)
@@ -26,6 +26,9 @@
 #include <sys/socket.h>
 
 #include <glib/gi18n.h>
+
+#include "nm-wimax-util.h"
+
 #include <WiMaxAPI.h>
 #include <WiMaxAPIEx.h>
 
index bca25a1..3c90eba 100644 (file)
@@ -18,7 +18,6 @@
  * Copyright (C) 2009 Novell, Inc.
  */
 
-#include <WiMaxAPI.h>
 #include "nm-wimax-util.h"
 #include "nm-utils.h"
 #include "iwmxsdk.h"
index d5ec0f0..3652123 100644 (file)
 
 #include <glib.h>
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+
 #include <WiMaxType.h>
+
+#pragma GCC diagnostic pop
+
 #include <WiMaxError.h>
 #include "nm-wimax-types.h"