From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WK6L6-0001T1-N4 for qemu-devel@nongnu.org; Sun, 02 Mar 2014 08:22:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WK6L0-00052c-Oo for qemu-devel@nongnu.org; Sun, 02 Mar 2014 08:21:56 -0500 Message-ID: <5313306D.5010200@msgid.tls.msk.ru> Date: Sun, 02 Mar 2014 17:21:49 +0400 From: Michael Tokarev 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=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-trivial] [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 Cc: qemu-trivial@nongnu.org, Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , qemu-devel@nongnu.org, patches@linaro.org 27.02.2014 03:51, Peter Maydell =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > 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. Applied to -trivial, thank you! /mjt