Received: from [140.186.70.92] (port=45317 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5vcP-0000vz-VN for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5vcN-0007sW-VB for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5vcN-0007sQ-NB for qemu-devel@nongnu.org; Wed, 13 Oct 2010 03:19:19 -0400 From: Markus Armbruster References: Date: Wed, 13 Oct 2010 09:19:15 +0200 In-Reply-To: (Blue Swirl's message of "Tue, 12 Oct 2010 17:35:37 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] Suppress warning: zero-length gnu_printf format string List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Blue Swirl writes: > On Mon, Oct 11, 2010 at 12:52 PM, Markus Armbruster w= rote: >> Warns about this line in check-qjson.c: >> =C2=A0 =C2=A0QObject *obj =3D qobject_from_json(""); >> >> The obvious fix (add -Wno-format-zero-length to gcc_flags) doesn't >> work, because -Wall switches it on again. =C2=A0Fix by putting configured >> flags last. > > This would disable the flag globally. I'd rather disable the flag only > for check-qjson.o Is this warning worth the hassle? What's the problem with empty format strings? > or more generically, remove -Werror for checks. For > example, there could be a check for how we handle invalid formats and > then the sources would contain format strings that annoy GCC, but we > wouldn't want warnings from that to stop the build. If you want to go that extra mile, feel free. For me, --disable-werror has been good enough. Regardless, I think we need the second patch hunk, to prevent -Wall from trampling over $gcc_flags.