qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warn


From: Stuart Brady
Subject: Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added
Date: Sun, 14 Dec 2008 15:09:28 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]