* [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
@ 2008-12-14 11:12 Aurelien Jarno
2008-12-14 15:09 ` Stuart Brady
0 siblings, 1 reply; 6+ messages in thread
From: Aurelien Jarno @ 2008-12-14 11:12 UTC (permalink / raw)
To: qemu-devel
Revision: 6028
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6028
Author: aurel32
Date: 2008-12-14 11:12:28 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
target-ppc: use -Werror to make sure no new warning is added
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/Makefile.target
Modified: trunk/Makefile.target
===================================================================
--- trunk/Makefile.target 2008-12-14 11:12:20 UTC (rev 6027)
+++ trunk/Makefile.target 2008-12-14 11:12:28 UTC (rev 6028)
@@ -641,7 +641,7 @@
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
endif
ifeq ($(TARGET_BASE_ARCH), ppc)
-CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
+CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE -Werror
# shared objects
OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o
# PREP target
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
2008-12-14 11:12 [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added Aurelien Jarno
@ 2008-12-14 15:09 ` Stuart Brady
2008-12-14 16:56 ` Aurelien Jarno
0 siblings, 1 reply; 6+ messages in thread
From: Stuart Brady @ 2008-12-14 15:09 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 14, 2008 at 11:12:28AM +0000, Aurelien Jarno wrote:
> Log Message:
> -----------
> target-ppc: use -Werror to make sure no new warning is added
make -C ppc-softmmu all
make[1]: Entering directory `.../qemu/ppc-softmmu'
gcc ... .../qemu/vl.c
cc1: warnings being treated as errors
.../qemu/vl.c: In function 'host_alarm_handler':
.../qemu/vl.c:1352: error: ignoring return value of 'write', declared
with attribute warn_unused_result
.../qemu/vl.c: In function 'main':
.../qemu/vl.c:5202: error: ignoring return value of 'write', declared
with attribute warn_unused_result
.../qemu/vl.c:5515: error: ignoring return value of 'chdir', declared
with attribute warn_unused_result
make[1]: *** [vl.o] Error 1
make[1]: Leaving directory `.../qemu/ppc-softmmu'
make: *** [subdir-ppc-softmmu] Error 2
Also this one, which is a bit more trivial:
.../qemu/tcg/tcg.c: In function 'tcg_dump_ops':
.../qemu/tcg/tcg.c:889: warning: format not a string literal and no
format arguments
Index: tcg/tcg.c
===================================================================
--- tcg/tcg.c (revision 6028)
+++ tcg/tcg.c (working copy)
@@ -886,7 +886,7 @@
val = args[1];
th = tcg_find_helper(s, val);
if (th) {
- fprintf(outfile, th->name);
+ fprintf(outfile, "%s", th->name);
} else {
if (c == INDEX_op_movi_i32)
fprintf(outfile, "0x%x", (uint32_t)val);
Perhaps these should be fixed, but -Werror is a bit of a pain, as you
can't choose which warnings are critical, and different warnings will
be generated with different versions of gcc, different optimisation
levels and different header files.
Additional warnings get added, and some warnings might become less noisy
in the future... perhaps this one might just go away, given time:
.../qemu/target-cris/translate.c: In function 'dec_movem_mr':
.../qemu/target-cris/translate.c:2727: warning: 'tmp32' may be used
uninitialized in this function
Cheers,
--
Stuart Brady
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
2008-12-14 15:09 ` Stuart Brady
@ 2008-12-14 16:56 ` Aurelien Jarno
2008-12-14 17:16 ` Stuart Brady
2008-12-14 17:34 ` Kirill A. Shutemov
0 siblings, 2 replies; 6+ messages in thread
From: Aurelien Jarno @ 2008-12-14 16:56 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 14, 2008 at 03:09:28PM +0000, Stuart Brady wrote:
> On Sun, Dec 14, 2008 at 11:12:28AM +0000, Aurelien Jarno wrote:
> > Log Message:
> > -----------
> > target-ppc: use -Werror to make sure no new warning is added
>
> make -C ppc-softmmu all
> make[1]: Entering directory `.../qemu/ppc-softmmu'
> gcc ... .../qemu/vl.c
> cc1: warnings being treated as errors
> .../qemu/vl.c: In function 'host_alarm_handler':
> .../qemu/vl.c:1352: error: ignoring return value of 'write', declared
> with attribute warn_unused_result
> .../qemu/vl.c: In function 'main':
> .../qemu/vl.c:5202: error: ignoring return value of 'write', declared
> with attribute warn_unused_result
> .../qemu/vl.c:5515: error: ignoring return value of 'chdir', declared
> with attribute warn_unused_result
> make[1]: *** [vl.o] Error 1
> make[1]: Leaving directory `.../qemu/ppc-softmmu'
> make: *** [subdir-ppc-softmmu] Error 2
Which compiler are you using? I don't have those warnings.
> Also this one, which is a bit more trivial:
>
> .../qemu/tcg/tcg.c: In function 'tcg_dump_ops':
> .../qemu/tcg/tcg.c:889: warning: format not a string literal and no
> format arguments
>
> Index: tcg/tcg.c
> ===================================================================
> --- tcg/tcg.c (revision 6028)
> +++ tcg/tcg.c (working copy)
> @@ -886,7 +886,7 @@
> val = args[1];
> th = tcg_find_helper(s, val);
> if (th) {
> - fprintf(outfile, th->name);
> + fprintf(outfile, "%s", th->name);
> } else {
> if (c == INDEX_op_movi_i32)
> fprintf(outfile, "0x%x", (uint32_t)val);
>
> Perhaps these should be fixed, but -Werror is a bit of a pain, as you
> can't choose which warnings are critical, and different warnings will
> be generated with different versions of gcc, different optimisation
> levels and different header files.
>
> Additional warnings get added, and some warnings might become less noisy
> in the future... perhaps this one might just go away, given time:
>
> .../qemu/target-cris/translate.c: In function 'dec_movem_mr':
> .../qemu/target-cris/translate.c:2727: warning: 'tmp32' may be used
> uninitialized in this function
>
> Cheers,
> --
> Stuart Brady
>
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
2008-12-14 16:56 ` Aurelien Jarno
@ 2008-12-14 17:16 ` Stuart Brady
2008-12-14 17:54 ` Stuart Brady
2008-12-14 17:34 ` Kirill A. Shutemov
1 sibling, 1 reply; 6+ messages in thread
From: Stuart Brady @ 2008-12-14 17:16 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 14, 2008 at 05:56:16PM +0100, Aurelien Jarno wrote:
> On Sun, Dec 14, 2008 at 03:09:28PM +0000, Stuart Brady wrote:
> > .../qemu/vl.c:5202: error: ignoring return value of 'write', declared
> > with attribute warn_unused_result
> > .../qemu/vl.c:5515: error: ignoring return value of 'chdir', declared
> > with attribute warn_unused_result
>
> Which compiler are you using? I don't have those warnings.
GCC 4.3.2 with glibc 2.8.
--
Stuart Brady
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
2008-12-14 16:56 ` Aurelien Jarno
2008-12-14 17:16 ` Stuart Brady
@ 2008-12-14 17:34 ` Kirill A. Shutemov
1 sibling, 0 replies; 6+ messages in thread
From: Kirill A. Shutemov @ 2008-12-14 17:34 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
On Sun, Dec 14, 2008 at 05:56:16PM +0100, Aurelien Jarno wrote:
> On Sun, Dec 14, 2008 at 03:09:28PM +0000, Stuart Brady wrote:
> > On Sun, Dec 14, 2008 at 11:12:28AM +0000, Aurelien Jarno wrote:
> > > Log Message:
> > > -----------
> > > target-ppc: use -Werror to make sure no new warning is added
> >
> > make -C ppc-softmmu all
> > make[1]: Entering directory `.../qemu/ppc-softmmu'
> > gcc ... .../qemu/vl.c
> > cc1: warnings being treated as errors
> > .../qemu/vl.c: In function 'host_alarm_handler':
> > .../qemu/vl.c:1352: error: ignoring return value of 'write', declared
> > with attribute warn_unused_result
> > .../qemu/vl.c: In function 'main':
> > .../qemu/vl.c:5202: error: ignoring return value of 'write', declared
> > with attribute warn_unused_result
> > .../qemu/vl.c:5515: error: ignoring return value of 'chdir', declared
> > with attribute warn_unused_result
> > make[1]: *** [vl.o] Error 1
> > make[1]: Leaving directory `.../qemu/ppc-softmmu'
> > make: *** [subdir-ppc-softmmu] Error 2
>
> Which compiler are you using? I don't have those warnings.
This warnings generate when glibc built with enabled FORTIFY_SOURCE.
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.org/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
2008-12-14 17:16 ` Stuart Brady
@ 2008-12-14 17:54 ` Stuart Brady
0 siblings, 0 replies; 6+ messages in thread
From: Stuart Brady @ 2008-12-14 17:54 UTC (permalink / raw)
To: qemu-devel
On Sun, Dec 14, 2008 at 05:16:56PM +0000, Stuart Brady wrote:
> On Sun, Dec 14, 2008 at 05:56:16PM +0100, Aurelien Jarno wrote:
> > On Sun, Dec 14, 2008 at 03:09:28PM +0000, Stuart Brady wrote:
> > > .../qemu/vl.c:5202: error: ignoring return value of 'write', declared
> > > with attribute warn_unused_result
> > > .../qemu/vl.c:5515: error: ignoring return value of 'chdir', declared
> > > with attribute warn_unused_result
> >
> > Which compiler are you using? I don't have those warnings.
>
> GCC 4.3.2 with glibc 2.8.
FWIW, I'm only getting these warnings because the compiler I'm using
happens to predefine _FORTIFY_SOURCE. (They're also only generated if
you have GCC 4.1 or later, and are compiling with optimisation enabled.)
Cheers,
--
Stuart Brady
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-14 17:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-14 11:12 [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added Aurelien Jarno
2008-12-14 15:09 ` Stuart Brady
2008-12-14 16:56 ` Aurelien Jarno
2008-12-14 17:16 ` Stuart Brady
2008-12-14 17:54 ` Stuart Brady
2008-12-14 17:34 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).