[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Make Xen headers lint-clean
# HG changeset patch # User john.levon@xxxxxxx # Date 1181862105 25200 # Node ID b9d1affca0ff606998aee4cd46bd8f6c15fd4b23 # Parent 48ee88f21a3f6f4e92eafb2dec286df156f54cfe Make Xen headers lint-clean Make ring.h and xs_wire.h lint clean. Add an unused attribute to xsd_errors if using GCC, so we don't get duplicate arrays in every object including the header. Signed-off-by: John Levon <john.levon@xxxxxxx> Signed-off-by: Ryan Scott <ryan.scott@xxxxxxx> diff --git a/xen/include/public/io/ring.h b/xen/include/public/io/ring.h --- a/xen/include/public/io/ring.h +++ b/xen/include/public/io/ring.h @@ -139,7 +139,7 @@ typedef struct __name##_back_ring __name #define SHARED_RING_INIT(_s) do { \ (_s)->req_prod = (_s)->rsp_prod = 0; \ (_s)->req_event = (_s)->rsp_event = 1; \ - memset((_s)->pad, 0, sizeof((_s)->pad)); \ + (void) memset((_s)->pad, 0, sizeof((_s)->pad)); \ } while(0) #define FRONT_RING_INIT(_r, _s, __size) do { \ diff --git a/xen/include/public/io/xs_wire.h b/xen/include/public/io/xs_wire.h --- a/xen/include/public/io/xs_wire.h +++ b/xen/include/public/io/xs_wire.h @@ -60,7 +60,12 @@ struct xsd_errors const char *errstring; }; #define XSD_ERROR(x) { x, #x } -static struct xsd_errors xsd_errors[] __attribute__((unused)) = { +/* LINTED: static unused */ +static struct xsd_errors xsd_errors[] +#if defined(__GNUC__) +__attribute__((unused)) +#endif + = { XSD_ERROR(EINVAL), XSD_ERROR(EACCES), XSD_ERROR(EEXIST), _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |