]> git.proxmox.com Git - mirror_ovs.git/commitdiff
configure: Use -Wformat-security with -Wformat.
authorBen Pfaff <blp@ovn.org>
Mon, 5 Dec 2016 22:28:59 +0000 (14:28 -0800)
committerBen Pfaff <blp@ovn.org>
Mon, 12 Dec 2016 22:34:23 +0000 (14:34 -0800)
GCC 6.1 warns that -Wformat-security has no effect without -Wformat, so
this commit fixes the problem.

The change to _OVS_CHECK_CC_OPTION is needed so that the cache variable
name doesn't end up with a space in it, which obviously doesn't work.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
acinclude.m4
configure.ac

index 8b9297ae75dacffd63baa51120aab32c81999574..bea49d25ec1b7577affe31e3d17219ed2ab8e23c 100644 (file)
@@ -768,7 +768,7 @@ dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([_OVS_CHECK_CC_OPTION], [dnl
-  m4_define([ovs_cv_name], [ovs_cv_[]m4_translit([$1], [-=], [__])])dnl
+  m4_define([ovs_cv_name], [ovs_cv_[]m4_translit([$1], [-= ], [__])])dnl
   AC_CACHE_CHECK([whether $CC accepts $1], [ovs_cv_name], 
     [ovs_save_CFLAGS="$CFLAGS"
      dnl Include -Werror in the compiler options, because without -Werror
index 2f854dd52d76af714b4b0dc1ec6db53b1800ee74..ece6bf32758370cf9dae41e99b2cdbf38b04cf47 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -147,7 +147,7 @@ OVS_ENABLE_OPTION([-Wall])
 OVS_ENABLE_OPTION([-Wextra])
 OVS_ENABLE_OPTION([-Wno-sign-compare])
 OVS_ENABLE_OPTION([-Wpointer-arith])
-OVS_ENABLE_OPTION([-Wformat-security])
+OVS_ENABLE_OPTION([-Wformat -Wformat-security])
 OVS_ENABLE_OPTION([-Wswitch-enum])
 OVS_ENABLE_OPTION([-Wunused-parameter])
 OVS_ENABLE_OPTION([-Wbad-function-cast])