From: john.levon@sun.com Subject: [PATCH] Make Xen headers lint-clean Date: Thu, 14 Jun 2007 16:02:00 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User john.levon@sun.com # 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 Signed-off-by: Ryan Scott 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),