From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBsZS-0004gX-H2 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 10:07:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBsZQ-0004dG-OW for qemu-devel@nongnu.org; Sun, 14 Dec 2008 10:07:50 -0500 Received: from [199.232.76.173] (port=60718 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBsZQ-0004d7-Kr for qemu-devel@nongnu.org; Sun, 14 Dec 2008 10:07:48 -0500 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:21949) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBsZQ-0005GX-5o for qemu-devel@nongnu.org; Sun, 14 Dec 2008 10:07:48 -0500 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20081214150742.WCIV1717.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Sun, 14 Dec 2008 15:07:42 +0000 Received: from miranda.arrow ([213.107.23.205]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081214150742.MUSK2093.aamtaout03-winn.ispmail.ntl.com@miranda.arrow> for ; Sun, 14 Dec 2008 15:07:42 +0000 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1LBsb2-0003b3-Ow for qemu-devel@nongnu.org; Sun, 14 Dec 2008 15:09:28 +0000 Date: Sun, 14 Dec 2008 15:09:28 +0000 From: Stuart Brady Subject: Re: [Qemu-devel] [6028] target-ppc: use -Werror to make sure no new warning is added Message-ID: <20081214150928.GA13792@miranda.arrow> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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