提交 a38131b6 编写于 作者: B blueswir1

Attached patch contains warning fixes.

Signed-off-by: NChristoph Egger <Christoph.Egger@amd.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5888 c046a42c-6fe2-441c-8c8c-71466251a162
上级 b3efe5c8
...@@ -765,7 +765,7 @@ static int guess_disk_lchs(BlockDriverState *bs, ...@@ -765,7 +765,7 @@ static int guess_disk_lchs(BlockDriverState *bs,
int ret, i, heads, sectors, cylinders; int ret, i, heads, sectors, cylinders;
struct partition *p; struct partition *p;
uint32_t nr_sects; uint32_t nr_sects;
int64_t nb_sectors; uint64_t nb_sectors;
bdrv_get_geometry(bs, &nb_sectors); bdrv_get_geometry(bs, &nb_sectors);
...@@ -805,7 +805,7 @@ void bdrv_guess_geometry(BlockDriverState *bs, int *pcyls, int *pheads, int *pse ...@@ -805,7 +805,7 @@ void bdrv_guess_geometry(BlockDriverState *bs, int *pcyls, int *pheads, int *pse
{ {
int translation, lba_detected = 0; int translation, lba_detected = 0;
int cylinders, heads, secs; int cylinders, heads, secs;
int64_t nb_sectors; uint64_t nb_sectors;
/* if a geometry hint is available, use it */ /* if a geometry hint is available, use it */
bdrv_get_geometry(bs, &nb_sectors); bdrv_get_geometry(bs, &nb_sectors);
......
...@@ -105,6 +105,8 @@ static uint32_t mpcore_timer_read(mpcore_timer_state *s, int offset) ...@@ -105,6 +105,8 @@ static uint32_t mpcore_timer_read(mpcore_timer_state *s, int offset)
return s->control; return s->control;
case 12: /* Interrupt status. */ case 12: /* Interrupt status. */
return s->status; return s->status;
default:
return 0;
} }
} }
......
...@@ -68,7 +68,7 @@ static int ensure_ep_open(USBHostDevice *dev, int ep, int mode) ...@@ -68,7 +68,7 @@ static int ensure_ep_open(USBHostDevice *dev, int ep, int mode)
ep = UE_GET_ADDR(ep); ep = UE_GET_ADDR(ep);
if (dev->ep_fd[ep] < 0) { if (dev->ep_fd[ep] < 0) {
#if __FreeBSD__ #ifdef __FreeBSD__
snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep);
#else #else
snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep); snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep);
...@@ -321,7 +321,7 @@ USBDevice *usb_host_device_open(const char *devname) ...@@ -321,7 +321,7 @@ USBDevice *usb_host_device_open(const char *devname)
return NULL; return NULL;
} }
#if __FreeBSD__ #ifdef __FreeBSD__
snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]);
#else #else
snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]); snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]);
...@@ -413,7 +413,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) ...@@ -413,7 +413,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func)
if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0)
continue; continue;
#if __FreeBSD__ #ifdef __FreeBSD__
snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]);
#else #else
snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册