WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Make Xen headers lint-clean

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Make Xen headers lint-clean
From: john.levon@xxxxxxx
Date: Thu, 14 Jun 2007 16:02:00 -0700
Delivery-date: Thu, 14 Jun 2007 16:00:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>