From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWRwm-0007Y5-4w for qemu-devel@nongnu.org; Mon, 31 Aug 2015 12:28:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWRwj-0007aT-Ry for qemu-devel@nongnu.org; Mon, 31 Aug 2015 12:28:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWRwj-0007aH-Hs for qemu-devel@nongnu.org; Mon, 31 Aug 2015 12:28:37 -0400 References: <1441036533-26113-1-git-send-email-armbru@redhat.com> <1441036533-26113-5-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55E480B4.1070406@redhat.com> Date: Mon, 31 Aug 2015 10:28:36 -0600 MIME-Version: 1.0 In-Reply-To: <1441036533-26113-5-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fctSmgmXuhnpglH1N461CAq6jhK4ouH3H" Subject: Re: [Qemu-devel] [PATCH 31/31] qapi: Simplify error reporting for array types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fctSmgmXuhnpglH1N461CAq6jhK4ouH3H Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/31/2015 09:55 AM, Markus Armbruster wrote: > check_type() first checks and peels off the array type, then checks > the element type. For two out of four error messages, it takes pains > to report errors for "array of T" instead of just T. Odd. Let's > examine the errors. >=20 > * The remaining two errors are unreachable, because the array checking > ensures that value is a string. If we ever decide to enhance the grammar to allow array-of-anonymous-type, we'd have to revisit this code; but that doesn't affect the validity of this patch going in now. >=20 > Thus, reporting some errors for "array of T" instead of just T works, > but dosn't really improve things. Drop it. s/dosn't/doesn't/ >=20 > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 6 ++---- > tests/qapi-schema/args-array-unknown.err | 2 +- > tests/qapi-schema/returns-whitelist.err | 2 +- > 3 files changed, 4 insertions(+), 6 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fctSmgmXuhnpglH1N461CAq6jhK4ouH3H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV5IC0AAoJEKeha0olJ0NqlQkH/itobSEN5A4iwraESFpIYabF o/j24gkQ0tBpEuDxCKEXudVg/+JxgOrpBWAqejl3JAcxJvZi2cYho0eaJrbkSpve 1uzJEkgSvEYTx4BJY8FXsWWvHAljQHhrRip6o4DFoWBagQeIMeB2Bchl9AKu6GZ9 s654YZeUbeln6rerveNv6T7XxHgE15vMx/uXgc+MB+BpHVGVH10PWkqXtp7QmOMC 4qXXn6oxeXZrGmZXOO5c+RosefDPs1xMpTm6PCgkSQahJisIbPRQ6ayatuM8tvhu PeRykTNcATQldFjIZ57MgXIskP+7gn5G6T2pkx5lfgxZ0OLmgWeGbMAYzJBFXkg= =id9I -----END PGP SIGNATURE----- --fctSmgmXuhnpglH1N461CAq6jhK4ouH3H--