From: Ian Campbell Subject: Re: [PATCH v6] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Date: Wed, 6 Jun 2012 14:58:41 +0100 Message-ID: <1338991121.32319.105.camel@zakaz.uk.xensource.com> References: <78af912f1823442009ea.1338990124@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <78af912f1823442009ea.1338990124@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Christoph Egger , Roger Pau Monne , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-06-06 at 14:42 +0100, Dario Faggioli wrote: > To avoid recent gcc complaining about: > libxl.c: In function 'libxl_primary_console_exec': > libxl.c:1233:9: error: case value '4294967295' not in enumerated type 'libxl_domain_type' [-Werror=switch] > > Also: > - have all the call sites of libxl__domain_type() return with error in > case the function returns LIBXL_DOMAIN_TYPE_INVALID; > - adjust all other code segments where -Wswitch makes would claim that > LIBXL_DOMAIN_TYPE_INVALID is not handled by adding a "default: abort();" > clause. > > Signed-off-by: Dario Faggioli > Signed-off-by: Christoph Egger Acked-by: Ian Campbell > @@ -310,6 +311,7 @@ libxl_domain_build_info = Struct("domain > # Use host's E820 for PCI passthrough. > ("e820_host", libxl_defbool), > ])), > + ("invalid", Struct(None, [])), > ], keyvar_init_val = "-1")), This -1 should => LIBXL_DOMAIN_TYPE_INVALID, but I'll just make that change as I commit it, if that's ok with you... > ], dir=DIR_IN > )