sflow: Avoid "unused parameter" warnings from GCC 4.4.
authorBen Pfaff <blp@nicira.com>
Fri, 30 Jul 2010 21:47:29 +0000 (14:47 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 30 Jul 2010 23:04:29 +0000 (16:04 -0700)
With GCC -Wno-unused by itself isn't enough to avoid "unused parameter"
warnings, since we also use -Wunused-parameter.  We also need to check for
and use -Wno-unused-parameter.

configure.ac
lib/automake.mk

index dad2fb9efad577183b768368f86a6ee24ac4f52d..04ffe6e81bb6c88ab3af2f435bfd123a0b3e0208 100644 (file)
@@ -86,6 +86,7 @@ OVS_ENABLE_OPTION([-Wmissing-prototypes])
 OVS_ENABLE_OPTION([-Wmissing-field-initializers])
 OVS_ENABLE_OPTION([-Wno-override-init])
 OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
+OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
 
 AC_ARG_VAR(KARCH, [Kernel Architecture String])
 AC_SUBST(KARCH)
index 0588eea55627c5faa78535c9b5ecfbead447b7ec..49f4e2c77d977c4b042830ca99dfb626f93b27a1 100644 (file)
@@ -168,6 +168,9 @@ lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
 if HAVE_WNO_UNUSED
 lib_libsflow_a_CFLAGS += -Wno-unused
 endif
+if HAVE_WNO_UNUSED_PARAMETER
+lib_libsflow_a_CFLAGS += -Wno-unused-parameter
+endif
 
 if HAVE_NETLINK
 lib_libopenvswitch_a_SOURCES += \