|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: Introduce LIBXL_DOMAIN_TYPE_INVALID to make gcc happy
Ian Campbell writes ("Re: [Xen-devel] [PATCH] libxl: Introduce
LIBXL_DOMAIN_TYPE_INVALID to make gcc happy"):
> I wonder if just changing the return type of libxl__domain_type to int
> would be better than this? I guess it'll probably be much the same.
The upside of making it be an int is that we could have
libxl_get_domain_type to return a proper libxl error code on failure,
so that it could explain the cause of the failure more carefully.
However, I think this is theoretical. A failure return is always
going to be morally equivalent to ERROR_RETURN.
And the upside of making it be an enum is precisely
> On Fri, 2012-05-18 at 15:48 +0100, Dario Faggioli wrote:
> > _libxl_types.c: In function âlibxl_domain_build_info_disposeâ:
> > _libxl_types.c:91:5: error: enumeration value âLIBXL_DOMAIN_TYPE_INVALIDâ
> > not handled in switch [-Werror=switch]
these warnings, which are alerting us to call sites with broken error
handling.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |