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 | 765 | int ret, i, heads, sectors, cylinders; |
| 766 | 766 | struct partition *p; |
| 767 | 767 | uint32_t nr_sects; |
| 768 | - int64_t nb_sectors; | |
| 768 | + uint64_t nb_sectors; | |
| 769 | 769 | |
| 770 | 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 | 805 | { |
| 806 | 806 | int translation, lba_detected = 0; |
| 807 | 807 | int cylinders, heads, secs; |
| 808 | - int64_t nb_sectors; | |
| 808 | + uint64_t nb_sectors; | |
| 809 | 809 | |
| 810 | 810 | /* if a geometry hint is available, use it */ |
| 811 | 811 | bdrv_get_geometry(bs, &nb_sectors); | ... | ... |
hw/mpcore.c
usb-bsd.c
| ... | ... | @@ -68,7 +68,7 @@ static int ensure_ep_open(USBHostDevice *dev, int ep, int mode) |
| 68 | 68 | ep = UE_GET_ADDR(ep); |
| 69 | 69 | |
| 70 | 70 | if (dev->ep_fd[ep] < 0) { |
| 71 | -#if __FreeBSD__ | |
| 71 | +#ifdef __FreeBSD__ | |
| 72 | 72 | snprintf(buf, sizeof(buf) - 1, "%s.%d", dev->devpath, ep); |
| 73 | 73 | #else |
| 74 | 74 | snprintf(buf, sizeof(buf) - 1, "%s.%02d", dev->devpath, ep); |
| ... | ... | @@ -321,7 +321,7 @@ USBDevice *usb_host_device_open(const char *devname) |
| 321 | 321 | return NULL; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | -#if __FreeBSD__ | |
| 324 | +#ifdef __FreeBSD__ | |
| 325 | 325 | snprintf(ctlpath, PATH_MAX, "/dev/%s", bus_info.udi_devnames[0]); |
| 326 | 326 | #else |
| 327 | 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 | 413 | if (strncmp(bus_info.udi_devnames[0], "ugen", 4) != 0) |
| 414 | 414 | continue; |
| 415 | 415 | |
| 416 | -#if __FreeBSD__ | |
| 416 | +#ifdef __FreeBSD__ | |
| 417 | 417 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s", bus_info.udi_devnames[0]); |
| 418 | 418 | #else |
| 419 | 419 | snprintf(devbuf, sizeof(devbuf) - 1, "/dev/%s.00", bus_info.udi_devnames[0]); | ... | ... |