From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEghm-0008If-Qr for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEghg-0006bg-6l for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:49:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55670 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEghf-0006ZI-Tt for qemu-devel@nongnu.org; Mon, 02 Apr 2012 08:49:48 -0400 Message-ID: <4F79A06A.9070602@suse.de> Date: Mon, 02 Apr 2012 14:49:46 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1333363816-1691-1-git-send-email-berrange@redhat.com> <1333363816-1691-8-git-send-email-berrange@redhat.com> In-Reply-To: <1333363816-1691-8-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 7/9] Add -Wmissing-format-attribute & fix problems it finds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Stefan Weil , qemu-devel@nongnu.org Am 02.04.2012 12:50, schrieb Daniel P. Berrange: > From: "Daniel P. Berrange" >=20 > * configure: Add -Wmissing-format-attribute > * hw/qxl.c: Add missing format attribute to qxl_guest_bug > and fix format specifiers in a caller of it > * qtest.c: Add missing format attribute to qtest_send There were patches for both of these on the list already: http://patchwork.ozlabs.org/patch/149983/ http://patchwork.ozlabs.org/patch/149835/ Andreas > Signed-off-by: Daniel P. Berrange > --- > configure | 1 + > hw/qxl.c | 4 ++-- > qtest.c | 2 +- > 3 files changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/configure b/configure > index 8ee6cdb..3d47440 100755 > --- a/configure > +++ b/configure > @@ -1193,6 +1193,7 @@ gcc_flags=3D"$gcc_flags -Wtrampolines" > gcc_flags=3D"$gcc_flags -Wmissing-parameter-type" > gcc_flags=3D"$gcc_flags -Wuninitialized" > gcc_flags=3D"$gcc_flags -Wlogical-op" > +gcc_flags=3D"$gcc_flags -Wmissing-format-attribute" > =20 > cat > $TMPC << EOF > int main(void) { return 0; } > diff --git a/hw/qxl.c b/hw/qxl.c > index 47a162e..33b2288 100644 > --- a/hw/qxl.c > +++ b/hw/qxl.c > @@ -124,7 +124,7 @@ static void qxl_reset_memslots(PCIQXLDevice *d); > static void qxl_reset_surfaces(PCIQXLDevice *d); > static void qxl_ring_set_dirty(PCIQXLDevice *qxl); > =20 > -void qxl_guest_bug(PCIQXLDevice *qxl, const char *msg, ...) > +GCC_FMT_ATTR(2, 3) void qxl_guest_bug(PCIQXLDevice *qxl, const char *m= sg, ...) > { > qxl_send_events(qxl, QXL_INTERRUPT_ERROR); > if (qxl->guestdebug) { > @@ -1370,7 +1370,7 @@ async_common: > case QXL_IO_DESTROY_SURFACE_WAIT: > if (val >=3D NUM_SURFACES) { > qxl_guest_bug(d, "QXL_IO_DESTROY_SURFACE (async=3D%d):" > - "%d >=3D NUM_SURFACES", async, val); > + "%"PRIx64" >=3D NUM_SURFACES", async, val= ); > goto cancel_async; > } > qxl_spice_destroy_surface_wait(d, val, async); > diff --git a/qtest.c b/qtest.c > index cd7186c..2b71de3 100644 > --- a/qtest.c > +++ b/qtest.c > @@ -156,7 +156,7 @@ static void qtest_send_prefix(CharDriverState *chr) > tv.tv_sec, tv.tv_usec); > } > =20 > -static void qtest_send(CharDriverState *chr, const char *fmt, ...) > +GCC_FMT_ATTR(2, 3) static void qtest_send(CharDriverState *chr, const = char *fmt, ...) > { > va_list ap; > char buffer[1024]; --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg