summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-10-29 12:59:51 +0100
committerThomas Haller <thaller@redhat.com>2014-10-29 14:09:52 +0100
commitf1a0b4afd20d03b047977b7715df9e557ee24d76 (patch)
treef9c128e3de2f8017f598bbc6870f9ea9d8289611
parentdd243ceefe998be36b5f0bea014d007ba30ec3fb (diff)
downloadNetworkManager-f1a0b4afd20d03b047977b7715df9e557ee24d76.tar.gz
build: renable -Wstrict-prototypes compiler warning
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>
-rw-r--r--m4/compiler_warnings.m41
-rw-r--r--src/devices/wimax/iwmxsdk.c3
-rw-r--r--src/devices/wimax/iwmxsdk.h3
-rw-r--r--src/devices/wimax/nm-device-wimax.c3
-rw-r--r--src/devices/wimax/nm-wimax-util.c1
-rw-r--r--src/devices/wimax/nm-wimax-util.h6
6 files changed, 14 insertions, 3 deletions
diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
index 79d2cbfe97..3fde795504 100644
--- a/m4/compiler_warnings.m4
+++ b/m4/compiler_warnings.m4
@@ -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 \
diff --git a/src/devices/wimax/iwmxsdk.c b/src/devices/wimax/iwmxsdk.c
index e6b54d8bea..2508088819 100644
--- a/src/devices/wimax/iwmxsdk.c
+++ b/src/devices/wimax/iwmxsdk.c
@@ -31,7 +31,8 @@
#include <glib.h>
-#include <WiMaxType.h>
+#include "nm-wimax-util.h"
+
#include <WiMaxAPI.h>
#include <WiMaxAPIEx.h>
diff --git a/src/devices/wimax/iwmxsdk.h b/src/devices/wimax/iwmxsdk.h
index 9a1b8196d1..c8e766964f 100644
--- a/src/devices/wimax/iwmxsdk.h
+++ b/src/devices/wimax/iwmxsdk.h
@@ -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>
diff --git a/src/devices/wimax/nm-device-wimax.c b/src/devices/wimax/nm-device-wimax.c
index ec892b68ff..34c2d2a54d 100644
--- a/src/devices/wimax/nm-device-wimax.c
+++ b/src/devices/wimax/nm-device-wimax.c
@@ -26,6 +26,9 @@
#include <sys/socket.h>
#include <glib/gi18n.h>
+
+#include "nm-wimax-util.h"
+
#include <WiMaxAPI.h>
#include <WiMaxAPIEx.h>
diff --git a/src/devices/wimax/nm-wimax-util.c b/src/devices/wimax/nm-wimax-util.c
index bca25a1dbf..3c90ebae96 100644
--- a/src/devices/wimax/nm-wimax-util.c
+++ b/src/devices/wimax/nm-wimax-util.c
@@ -18,7 +18,6 @@
* Copyright (C) 2009 Novell, Inc.
*/
-#include <WiMaxAPI.h>
#include "nm-wimax-util.h"
#include "nm-utils.h"
#include "iwmxsdk.h"
diff --git a/src/devices/wimax/nm-wimax-util.h b/src/devices/wimax/nm-wimax-util.h
index d5ec0f04d7..3652123f4b 100644
--- a/src/devices/wimax/nm-wimax-util.h
+++ b/src/devices/wimax/nm-wimax-util.h
@@ -23,7 +23,13 @@
#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"