diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-06-29 00:26:47 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-06-29 00:26:47 (GMT) |
commit | 6ced6457c3048bd10bf6f470b329b4810d9be826 (patch) | |
tree | a90c9464b052898428c596e7c085683024141890 /config | |
parent | 2042c775f0d9240609527e621d84e4911ad7f6a5 (diff) | |
download | hdf5-6ced6457c3048bd10bf6f470b329b4810d9be826.zip hdf5-6ced6457c3048bd10bf6f470b329b4810d9be826.tar.gz hdf5-6ced6457c3048bd10bf6f470b329b4810d9be826.tar.bz2 |
Move the -Wformat-nonliteral warning to the developer flags. Fix bugs
I introduced in the last commit.
Diffstat (limited to 'config')
-rw-r--r-- | config/gnu-flags | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index ced54c9..fc3a6ce 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -113,9 +113,11 @@ case "$cc_vendor-$cc_version" in # NOTE: Don't add -Wpadded here since we can't/won't fix the (many) # warnings that are emitted. If you need it, add it from the # environment variable at configure time. + # NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add + # it to the developer flags. H5_CFLAGS="$H5_CFLAGS $arch -pedantic -Wall -Wextra -Wbad-function-cast -Wc++-compat -Wcast-align" H5_CFLAGS="$H5_CFLAGS -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal" - H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs" + H5_CFLAGS="$H5_CFLAGS -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs" H5_CFLAGS="$H5_CFLAGS -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith" H5_CFLAGS="$H5_CFLAGS -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-enum -Wswitch-default" # As of GCC 8.x, the -Wunsafe-loop-optimizations has been removed @@ -150,7 +152,8 @@ case "$cc_vendor-$cc_version" in esac # Developer warnings (suggestions from gcc, not code problems) - DEVELOPER_WARNING_CFLAGS="-Winline -Waggregate-return -Wmissing-format-attribute -Wmissing-noreturn" + # NOTE: -Wformat-nonliteral added back in here (from being disabled in H5_CFLAGS) + DEVELOPER_WARNING_CFLAGS="-Winline -Waggregate-return -Wmissing-format-attribute -Wmissing-noreturn -Wformat-nonliteral" NO_DEVELOPER_WARNING_CFLAGS="-Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn" # Symbols |