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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] redundant ampersand before array name in __RING_SIZE

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] redundant ampersand before array name in __RING_SIZE macro
From: Richard Miller <9xen@xxxxxxxxxxxx>
Date: Wed, 4 Oct 2006 14:46:46 +0100
Delivery-date: 2006年10月04日 06:47:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <8916e865c8681e15968771fe3b555aa5@xxxxxxxxxxxx>
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
The __RING_SIZE macro in xen/include/public/io/ring.h has an ampersand
before (_s)->ring which is unnecessary (an array name without subscript already
means "address of"), and causes fussy C compilers like the Plan 9 one to 
generate
very many warning messages like this when the FRONT_RING_INIT macro is used:
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 warning: etherxen.c:215 address of array/func ignored
 ... etc
Would you like to tidy it up with the attached patch?
-- Richard Miller
# HG changeset patch
# User miller@vt310
# Node ID 16863ad2efc0f6b4abe7b8239f55946aa3f336fc
# Parent 473689acffdbc8b615fbc38ce8a877a904b702ed
Remove redundant '&' before array name in __RING_SIZE macro.
Signed-off-by: Richard Miller <9xen@xxxxxxxxxxxx>
diff -r 473689acffdb -r 16863ad2efc0 xen/include/public/io/ring.h
--- a/xen/include/public/io/ring.h Tue Oct 03 17:53:42 2006 +0100
+++ b/xen/include/public/io/ring.h Wed Oct 04 12:27:45 2006 +0100
@@ -25,7 +25,7 @@ typedef unsigned int RING_IDX;
 * power of two (so we can mask with (size-1) to loop around).
 */
 #define __RING_SIZE(_s, _sz) \
- (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
+ (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
 
 /*
 * Macros to make the correct C datatypes for a new kind of ring.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [RFC] 2nd -- Disallowing xm operations on HVM domains , Stefan Berger
Next by Date: [Xen-devel] Re: invalid PTE for xen_start-info ? , Rik van Riel
Previous by Thread: [Xen-devel] xen-3.0.3-testing-install-x86_32 dom0 boot failure , Richard Miller
Next by Thread: Re: [Xen-devel] Xen 3.0.3 rc2 available , Nick Craig-Wood
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /