[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-patch] Bugfix release for patch 2.7
From: |
Jim Meyering |
Subject: |
Re: [bug-patch] Bugfix release for patch 2.7 |
Date: |
Sat, 22 Sep 2012 21:37:42 +0200 |
Andreas Grünbacher wrote:
> A number of annoying problems and bugs were found in the patch 2.7 release.
...
Thanks for all that work.
I've just built with --enable-gcc-warnings from master and saw this:
make[2]: Entering directory `/h/j/w/co/patch/src'
CC inp.o
CC patch.o
CC pch.o
CC util.o
CC version.o
CC merge.o
util.c: In function 'copy_attr_error':
util.c:186:7: error: function might be possible candidate for
'gnu_printf' format attribute [-Werror=suggest-attribute=format]
verror (0, err, fmt, ap);
^
util.c: In function 'vsay':
util.c:960:3: error: function might be possible candidate for
'gnu_printf' format attribute [-Werror=suggest-attribute=format]
vfprintf (stdout, format, args);
^
cc1: all warnings being treated as errors
make[2]: *** [util.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Here's a fix to disable that -W option:
(I normally prefer to leave the warning option and fix the code,
but in this case, and in similar code in coreutils, it was not
worthwhile)
>From b272c2d535c3d9d6ff30ec83b5fa6e97aa3545f1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 22 Sep 2012 21:35:04 +0200
Subject: [PATCH] build: avoid gcc warnings from -Wsuggest-attribute=format
* configure.ac (WARN_CFLAGS): Disable -Wsuggest-attribute=format,
to avoid some warnings that are not worth working around.
---
configure.ac | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac
index 9943f03..dc837d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ if test "$gl_gcc_warnings" = yes; then
nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wstack-protector" # not worth working around
nw="$nw -Wmissing-format-attribute" # not worth working around in patch
+ nw="$nw -Wsuggest-attribute=format" # warns about util.c
# things to fix soon:
nw="$nw -Wshadow"
nw="$nw -Wstrict-overflow"
--
1.7.12.1.382.gb0576a6