From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKFEo-0003ih-EY for qemu-devel@nongnu.org; Sun, 02 Mar 2014 17:52:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKFEj-0000AP-8o for qemu-devel@nongnu.org; Sun, 02 Mar 2014 17:52:02 -0500 Message-ID: <5313B60A.8010303@suse.de> Date: Sun, 02 Mar 2014 23:51:54 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= 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: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 , Michael Tokarev , patches@linaro.org Am 27.02.2014 00:51, schrieb Peter Maydell: > 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 "interpret" > 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 Otherwise Reviewed-by: Andreas F=E4rber Regards, Andreas --=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