From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVBEm-0001hP-UF for qemu-devel@nongnu.org; Wed, 24 Apr 2013 21:44:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVBEm-0001nG-0p for qemu-devel@nongnu.org; Wed, 24 Apr 2013 21:44:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVBEl-0001n8-O7 for qemu-devel@nongnu.org; Wed, 24 Apr 2013 21:44:39 -0400 Message-ID: <51788A85.20500@redhat.com> Date: Wed, 24 Apr 2013 19:44:37 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366807646-8473-2-git-send-email-akong@redhat.com> <1366824804-24532-1-git-send-email-akong@redhat.com> <20130424142020.4e6a54a1@redhat.com> <20130425011451.GB3230@t430s.nay.redhat.com> <20130424213540.3a55cb5b@redhat.com> In-Reply-To: <20130424213540.3a55cb5b@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2KQHGVCVLPOKXPLNERKRH" Subject: Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, Amos Kong , qemu-devel@nongnu.org, jyang@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2KQHGVCVLPOKXPLNERKRH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/24/2013 07:35 PM, Luiz Capitulino wrote: >> case QEMU_OPT_SIZE: = =20 >> param_info->type =3D CONFIG_PARAM_TYPE_SIZE; = =20 >> break; >> } =20 >=20 > Looks good. >=20 >> I think we don't need default here, until some add new items in enum >> QemuOptType without update this code. >=20 > Maybe we can have: >=20 > default: > abort(); >=20 > So that we catch new QEmuOpts types not accompanied by a new ConfigPara= mType > type. gcc is able to warn about missed options if you omit a default case (and if the switch was on an actual enum type); but does not warn about missed options if you do have a default case. Libvirt has actually been switching to default-free coding styles on any switch statement where we expect an enum will grow in the future, for that reason. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2KQHGVCVLPOKXPLNERKRH 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJReIqGAAoJEKeha0olJ0NqQicH/iS22ItzQ8Jan/dNIO/sBVi6 4zu3uEeHE4rUQTANEKwZbijqebnEjRKs8RJTA9qEXxMDAbJHXEVvc65TFIx6gp0t UPLxJpErtO7yPAOYnvvBcDknhddDnmInI1hZ/bNibe47GQut4x+7JcUG8BT8F15c pJBSYRPqWPI9RF13bpkZr/V6UGr1Qm9Ahp5MaQ/zfrN9ege4tFIVSwY50cSqInvT sYCcJmCrkN0+8AGO4kmofgpkeTG6imLVT27KTK9DxnpK5zG74nIv4sjV8PNcPn0s yszbtOW8uTxXbH0/Ugly5Ua9EXgAlefIuH2ZNysHbYH8qaqHAjqIhnKt0JpuH9Q= =finT -----END PGP SIGNATURE----- ------enig2KQHGVCVLPOKXPLNERKRH--