mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
build: enable -Wsuggest-attribute=pure|const in lib/,...
but not in gnulib-tests/. * configure.ac (GNULIB_WARN_CFLAGS): Do not exclude -Wsuggest-attribute=pure|const, thus enabling these two warning options in lib/, since gnulib now toes the line. Continue to disable them in gnulib-tests/, since some programs there trigger these suggestions and are not worth fixing.
This commit is contained in:
1 parent
1e676ec844
commit
73a9acd6e8
1 file changed
+3
-3
+3
-3
@@ -156,15 +156,15 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
# FIXME: it may be easy to remove this, since it affects only one file:
|
||||
# the snprintf call at ftoastr.c:132.
|
||||
nw="$nw -Wdouble-promotion"
|
||||
# FIXME: remove/reenable the following two, once gnulib is adjusted.
|
||||
nw="$nw -Wsuggest-attribute=const"
|
||||
nw="$nw -Wsuggest-attribute=pure"
|
||||
gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
|
||||
AC_SUBST([GNULIB_WARN_CFLAGS])
|
||||
|
||||
# For gnulib-tests, the set is slightly smaller still.
|
||||
nw=
|
||||
nw="$nw -Wstrict-prototypes"
|
||||
# It's not worth being this picky about test programs.
|
||||
nw="$nw -Wsuggest-attribute=const"
|
||||
nw="$nw -Wsuggest-attribute=pure"
|
||||
gl_MANYWARN_COMPLEMENT([GNULIB_TEST_WARN_CFLAGS],
|
||||
[$GNULIB_WARN_CFLAGS], [$nw])
|
||||
AC_SUBST([GNULIB_TEST_WARN_CFLAGS])
|
||||
|
||||
Reference in new issue
Block a user