aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/fdc.c2
-rw-r--r--hw/ide.c18
-rw-r--r--hw/ne2000.c4
-rw-r--r--hw/rtl8139.c5
-rw-r--r--hw/usb-uhci.c6
5 files changed, 18 insertions, 17 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index ec9c2a3a98..868ae076a4 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -180,7 +180,7 @@ typedef struct fd_format_t {
uint8_t last_sect;
uint8_t max_track;
uint8_t max_head;
- const unsigned char *str;
+ const char *str;
} fd_format_t;
static const fd_format_t fd_formats[] = {
diff --git a/hw/ide.c b/hw/ide.c
index 13a880bec6..3bf8be01e5 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -471,12 +471,12 @@ static void ide_identify(IDEState *s)
put_le16(p + 5, 512); /* XXX: retired, remove ? */
put_le16(p + 6, s->sectors);
snprintf(buf, sizeof(buf), "QM%05d", s->drive_serial);
- padstr((uint8_t *)(p + 10), buf, 20); /* serial number */
+ padstr((char *)(p + 10), buf, 20); /* serial number */
put_le16(p + 20, 3); /* XXX: retired, remove ? */
put_le16(p + 21, 512); /* cache size in sectors */
put_le16(p + 22, 4); /* ecc bytes */
- padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */
- padstr((uint8_t *)(p + 27), "QEMU HARDDISK", 40); /* model */
+ padstr((char *)(p + 23), QEMU_VERSION, 8); /* firmware version */
+ padstr((char *)(p + 27), "QEMU HARDDISK", 40); /* model */
#if MAX_MULT_SECTORS > 1
put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
#endif
@@ -536,12 +536,12 @@ static void ide_atapi_identify(IDEState *s)
/* Removable CDROM, 50us response, 12 byte packets */
put_le16(p + 0, (2 << 14) | (5 << 8) | (1 << 7) | (2 << 5) | (0 << 0));
snprintf(buf, sizeof(buf), "QM%05d", s->drive_serial);
- padstr((uint8_t *)(p + 10), buf, 20); /* serial number */
+ padstr((char *)(p + 10), buf, 20); /* serial number */
put_le16(p + 20, 3); /* buffer type */
put_le16(p + 21, 512); /* cache size in sectors */
put_le16(p + 22, 4); /* ecc bytes */
- padstr((uint8_t *)(p + 23), QEMU_VERSION, 8); /* firmware version */
- padstr((uint8_t *)(p + 27), "QEMU CD-ROM", 40); /* model */
+ padstr((char *)(p + 23), QEMU_VERSION, 8); /* firmware version */
+ padstr((char *)(p + 27), "QEMU CD-ROM", 40); /* model */
put_le16(p + 48, 1); /* dword I/O (XXX: should not be set on CDROM) */
#ifdef USE_DMA_CDROM
put_le16(p + 49, 1 << 9 | 1 << 8); /* DMA and LBA supported */
@@ -591,10 +591,10 @@ static void ide_cfata_identify(IDEState *s)
put_le16(p + 7, s->nb_sectors >> 16); /* Sectors per card */
put_le16(p + 8, s->nb_sectors); /* Sectors per card */
snprintf(buf, sizeof(buf), "QM%05d", s->drive_serial);
- padstr((uint8_t *)(p + 10), buf, 20); /* Serial number in ASCII */
+ padstr((char *)(p + 10), buf, 20); /* Serial number in ASCII */
put_le16(p + 22, 0x0004); /* ECC bytes */
- padstr((uint8_t *) (p + 23), QEMU_VERSION, 8); /* Firmware Revision */
- padstr((uint8_t *) (p + 27), "QEMU MICRODRIVE", 40);/* Model number */
+ padstr((char *) (p + 23), QEMU_VERSION, 8); /* Firmware Revision */
+ padstr((char *) (p + 27), "QEMU MICRODRIVE", 40);/* Model number */
#if MAX_MULT_SECTORS > 1
put_le16(p + 47, 0x8000 | MAX_MULT_SECTORS);
#else
diff --git a/hw/ne2000.c b/hw/ne2000.c
index e95f537c94..44f30c2afb 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -647,7 +647,7 @@ static uint32_t ne2000_reset_ioport_read(void *opaque, uint32_t addr)
static void ne2000_save(QEMUFile* f,void* opaque)
{
NE2000State* s=(NE2000State*)opaque;
- int tmp;
+ uint32_t tmp;
if (s->pci_dev)
pci_device_save(s->pci_dev, f);
@@ -679,7 +679,7 @@ static int ne2000_load(QEMUFile* f,void* opaque,int version_id)
{
NE2000State* s=(NE2000State*)opaque;
int ret;
- int tmp;
+ uint32_t tmp;
if (version_id > 3)
return -EINVAL;
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 6e3c023b3d..8a23bb7b9a 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3119,7 +3119,7 @@ static uint32_t rtl8139_mmio_readl(void *opaque, target_phys_addr_t addr)
static void rtl8139_save(QEMUFile* f,void* opaque)
{
RTL8139State* s=(RTL8139State*)opaque;
- int i;
+ unsigned int i;
pci_device_save(s->pci_dev, f);
@@ -3205,7 +3205,8 @@ static void rtl8139_save(QEMUFile* f,void* opaque)
static int rtl8139_load(QEMUFile* f,void* opaque,int version_id)
{
RTL8139State* s=(RTL8139State*)opaque;
- int i, ret;
+ unsigned int i;
+ int ret;
/* just 2 versions for now */
if (version_id > 3)
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 1ebe9591ef..b55fd849ae 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -508,7 +508,7 @@ static void uhci_async_complete_packet(USBPacket * packet, void *opaque);
0 if TD successful
1 if TD unsuccessful or inactive
*/
-static int uhci_handle_td(UHCIState *s, UHCI_TD *td, int *int_mask,
+static int uhci_handle_td(UHCIState *s, UHCI_TD *td, uint32_t *int_mask,
int completion)
{
uint8_t pid;
@@ -733,8 +733,8 @@ static void uhci_frame_timer(void *opaque)
{
UHCIState *s = opaque;
int64_t expire_time;
- uint32_t frame_addr, link, old_td_ctrl, val;
- int int_mask, cnt, ret;
+ uint32_t frame_addr, link, old_td_ctrl, val, int_mask;
+ int cnt, ret;
UHCI_TD td;
UHCI_QH qh;
uint32_t old_async_qh;