qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [5888] Attached patch contains warning fixes.


From: Blue Swirl
Subject: [Qemu-devel] [5888] Attached patch contains warning fixes.
Date: Fri, 05 Dec 2008 17:56:41 +0000

Revision: 5888
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5888
Author:   blueswir1
Date:     2008-12-05 17:56:40 +0000 (Fri, 05 Dec 2008)

Log Message:
-----------
Attached patch contains warning fixes.

Signed-off-by: Christoph Egger <address@hidden>

Modified Paths:
--------------
    trunk/block.c
    trunk/hw/mpcore.c
    trunk/usb-bsd.c

Modified: trunk/block.c
===================================================================
--- trunk/block.c       2008-12-05 17:55:45 UTC (rev 5887)
+++ trunk/block.c       2008-12-05 17:56:40 UTC (rev 5888)
@@ -765,7 +765,7 @@
     int ret, i, heads, sectors, cylinders;
     struct partition *p;
     uint32_t nr_sects;
-    int64_t nb_sectors;
+    uint64_t nb_sectors;
 
     bdrv_get_geometry(bs, &nb_sectors);
 
@@ -805,7 +805,7 @@
 {
     int translation, lba_detected = 0;
     int cylinders, heads, secs;
-    int64_t nb_sectors;
+    uint64_t nb_sectors;
 
     /* if a geometry hint is available, use it */
     bdrv_get_geometry(bs, &nb_sectors);

Modified: trunk/hw/mpcore.c
===================================================================
--- trunk/hw/mpcore.c   2008-12-05 17:55:45 UTC (rev 5887)
+++ trunk/hw/mpcore.c   2008-12-05 17:56:40 UTC (rev 5888)
@@ -105,6 +105,8 @@
         return s->control;
     case 12: /* Interrupt status.  */
         return s->status;
+    default:
+        return 0;
     }
 }
 

Modified: trunk/usb-bsd.c
===================================================================
--- trunk/usb-bsd.c     2008-12-05 17:55:45 UTC (rev 5887)
+++ trunk/usb-bsd.c     2008-12-05 17:56:40 UTC (rev 5888)
@@ -68,7 +68,7 @@
     ep = UE_GET_ADDR(ep);
 
     if (dev->ep_fd[ep] < 0) {
-#if __FreeBSD__
+#ifdef __FreeBSD__
         snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep);
 #else
         snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep);
@@ -321,7 +321,7 @@
         return NULL;
     }
 
-#if __FreeBSD__
+#ifdef __FreeBSD__
     snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]);
 #else
     snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]);
@@ -413,7 +413,7 @@
             if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0)
                 continue;
 
-#if __FreeBSD__
+#ifdef __FreeBSD__
             snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", 
bus_info.udi_devnames[0]);
 #else
             snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", 
bus_info.udi_devnames[0]);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]