From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIoKt-0008RQ-PI for qemu-devel@nongnu.org; Wed, 26 Feb 2014 18:56:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIoKp-0007mf-F0 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 18:56:23 -0500 Message-ID: <530E7F1F.2040802@redhat.com> Date: Wed, 26 Feb 2014 16:56:15 -0700 From: Eric Blake MIME-Version: 1.0 References: <1393458706-24883-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1393458706-24883-1-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wVqIev1CjgjorMjFWjHSb8J6Gx7KI8637" Subject: Re: [Qemu-devel] [PATCH] qjson.h: Remove spurious GCC_FMT_ATTR markup from qobject_from_json() declaration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , patches@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wVqIev1CjgjorMjFWjHSb8J6Gx7KI8637 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/26/2014 04:51 PM, Peter Maydell wrote: > The function qobject_from_json() doesn't actually allow its > argument to be a format string -- it passes a NULL va_list* > to qobject_from_jsonv(), and the parser code will then never > actually intepret %-escape sequences (it tests whether the > va_list pointer is NULL and will stop with a parse error). >=20 > The spurious attribute markup causes clang warnings in some > of the test cases where we programmatically construct JSON > to feed to qobject_from_json(): >=20 > tests/test-qmp-input-visitor.c:76:35: warning: format string is not a > string literal (potentially insecure) [-Wformat-security] > data->obj =3D qobject_from_json(json_string); > ^~~~~~~~~~~ >=20 > Remove the incorrect attribute. >=20 > Signed-off-by: Peter Maydell > Suggested-by: Paolo Bonzini > --- > include/qapi/qmp/qjson.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wVqIev1CjgjorMjFWjHSb8J6Gx7KI8637 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTDn8fAAoJEKeha0olJ0Nqht4H/0LUHxl7jH0JaYrVrQ5KtVM/ jvqLnExido6cquYvxDA2HWU1jzvdcyzvAV7pzXA/UfDmt1vGuIe7cFd2Jazz+cLs nZhYKMiJTLZQC8ppEbGiwxSqvSy8ZvWJDoHE7Y5mwxDh4++YVyxYqhbQQGA0fW7/ ugrIL+URytBilh5iIjuCc10pq2HDDxG+CmPLgzQpy4qLiCznHadBjm329K29lPv/ W7jVlXYbisGpT+z7srpRSgDw+hRZ6KiIscOL6XL3MnvFgUMcqUv4lb41IspCoXHP m3f96llCiuB7tFsTLRaoncjdL8Pk0tvQTdJsTKHSma2fmAgcy1M7B5k72+JOX1E= =VIuv -----END PGP SIGNATURE----- --wVqIev1CjgjorMjFWjHSb8J6Gx7KI8637--