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-changelog

[Xen-changelog] Fixed compiler warnings of "cast to pointer from integer

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fixed compiler warnings of "cast to pointer from integer of different
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sat, 18 Jun 2005 08:22:11 +0000
Delivery-date: Sun, 19 Jun 2005 18:05:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1719, 2005/06/18 09:22:11+01:00, vh249@xxxxxxxxxxxxxxxxxxxxxx

        Fixed compiler warnings of "cast to pointer from integer of different
        size" which were caused by referencing memory addresses as 32bits on a 
64bit
        system.
        
        Signed-off-by: Jon Mason <jdmason@xxxxxxxxxx>
        Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>



 netfront.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c 
b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c   2005-06-19 
14:06:13 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c   2005-06-19 
14:06:13 -04:00
@@ -623,7 +623,7 @@
             /* Only copy the packet if it fits in the current MTU. */
             if (skb->len <= (dev->mtu + ETH_HLEN)) {
                 if ((skb->tail > skb->end) && net_ratelimit())
-                    printk(KERN_INFO "Received packet needs %d bytes more "
+                    printk(KERN_INFO "Received packet needs %zd bytes more "
                            "headroom.\n", skb->tail - skb->end);
 
                 if ((nskb = alloc_xen_skb(skb->len + 2)) != NULL) {
@@ -967,9 +967,9 @@
 
     /* Initialise {tx,rx}_skbs to be a free chain containing every entry. */
     for (i = 0; i <= NETIF_TX_RING_SIZE; i++)
-        np->tx_skbs[i] = (void *)(i+1);
+        np->tx_skbs[i] = (void *)((unsigned long) i+1);
     for (i = 0; i <= NETIF_RX_RING_SIZE; i++)
-        np->rx_skbs[i] = (void *)(i+1);
+        np->rx_skbs[i] = (void *)((unsigned long) i+1);
 
     dev->open            = network_open;
     dev->hard_start_xmit = network_start_xmit;
@@ -1343,7 +1343,7 @@
 {
     struct net_device *dev = (struct net_device *)((unsigned long)data & ~3UL);
     struct net_private *np = netdev_priv(dev);
-    int len = 0, which_target = (int)data & 3;
+    int len = 0, which_target = (unsigned long) data & 3;
     
     switch (which_target)
     {
@@ -1368,7 +1368,7 @@
 {
     struct net_device *dev = (struct net_device *)((unsigned long)data & ~3UL);
     struct net_private *np = netdev_priv(dev);
-    int which_target = (int)data & 3;
+    int which_target = (unsigned long) data & 3;
     char string[64];
     long target;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fixed compiler warnings of "cast to pointer from integer of different, BitKeeper Bot <=