Commit a38131b669253fe40eff41e17ab7d1df78adbcd8
1 parent
b3efe5c8
Attached patch contains warning fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5888 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
7 additions
and
5 deletions
block.c
| @@ -765,7 +765,7 @@ static int guess_disk_lchs(BlockDriverState *bs, | @@ -765,7 +765,7 @@ static int guess_disk_lchs(BlockDriverState *bs, | ||
| 765 | int ret, i, heads, sectors, cylinders; | 765 | int ret, i, heads, sectors, cylinders; |
| 766 | struct partition *p; | 766 | struct partition *p; |
| 767 | uint32_t nr_sects; | 767 | uint32_t nr_sects; |
| 768 | - int64_t nb_sectors; | 768 | + uint64_t nb_sectors; |
| 769 | 769 | ||
| 770 | bdrv_get_geometry(bs, &nb_sectors); | 770 | bdrv_get_geometry(bs, &nb_sectors); |
| 771 | 771 | ||
| @@ -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 | ||
| 805 | { | 805 | { |
| 806 | int translation, lba_detected = 0; | 806 | int translation, lba_detected = 0; |
| 807 | int cylinders, heads, secs; | 807 | int cylinders, heads, secs; |
| 808 | - int64_t nb_sectors; | 808 | + uint64_t nb_sectors; |
| 809 | 809 | ||
| 810 | /* if a geometry hint is available, use it */ | 810 | /* if a geometry hint is available, use it */ |
| 811 | bdrv_get_geometry(bs, &nb_sectors); | 811 | bdrv_get_geometry(bs, &nb_sectors); |
hw/mpcore.c
| @@ -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) | ||
| 105 | return s->control; | 105 | return s->control; |
| 106 | case 12: /* Interrupt status. */ | 106 | case 12: /* Interrupt status. */ |
| 107 | return s->status; | 107 | return s->status; |
| 108 | + default: | ||
| 109 | + return 0; | ||
| 108 | } | 110 | } |
| 109 | } | 111 | } |
| 110 | 112 |
usb-bsd.c
| @@ -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) | ||
| 68 | ep = UE_GET_ADDR(ep); | 68 | ep = UE_GET_ADDR(ep); |
| 69 | 69 | ||
| 70 | if (dev->ep_fd[ep] < 0) { | 70 | if (dev->ep_fd[ep] < 0) { |
| 71 | -#if __FreeBSD__ | 71 | +#ifdef __FreeBSD__ |
| 72 | snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); | 72 | snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); |
| 73 | #else | 73 | #else |
| 74 | snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep); | 74 | 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) | ||
| 321 | return NULL; | 321 | return NULL; |
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | -#if __FreeBSD__ | 324 | +#ifdef __FreeBSD__ |
| 325 | snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); | 325 | snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); |
| 326 | #else | 326 | #else |
| 327 | snprintf(ctlpath, PATH_MAX, "/dev/%s.00", bus_info.udi_devnames[0]); | 327 | 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) | ||
| 413 | if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) | 413 | if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) |
| 414 | continue; | 414 | continue; |
| 415 | 415 | ||
| 416 | -#if __FreeBSD__ | 416 | +#ifdef __FreeBSD__ |
| 417 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); | 417 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); |
| 418 | #else | 418 | #else |
| 419 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); | 419 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); |