aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-20 08:07:15 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-20 08:07:15 +0000
commitb55266b5a235afe7b0aa946e2a6d49010f35e71c (patch)
tree2fe5802cc0ce47d7e8d4bdd2ea08a8dfa74f6720 /hw
parent67d8cec34b1560973f5c25e14fac53b4ef5b0f6e (diff)
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/mips_malta.c3
-rw-r--r--hw/mips_mipssim.c3
-rw-r--r--hw/mips_r4k.c9
-rw-r--r--hw/nvram.h4
-rw-r--r--hw/pl080.c2
-rw-r--r--hw/ppc.c6
-rw-r--r--hw/ppc4xx.h2
-rw-r--r--hw/ppc4xx_devs.c2
-rw-r--r--hw/pxa2xx_dma.c2
-rw-r--r--hw/usb-net.c4
10 files changed, 20 insertions, 17 deletions
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index d94613c8e7..449b13bf30 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -701,7 +701,8 @@ static int64_t load_kernel (CPUState *env)
ram_addr_t initrd_offset;
if (load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
- &kernel_entry, &kernel_low, &kernel_high) < 0) {
+ (uint64_t *)&kernel_entry, (uint64_t *)&kernel_low,
+ (uint64_t *)&kernel_high) < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n",
loaderparams.kernel_filename);
exit(1);
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index fb56dc5450..dc62f696a0 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -61,7 +61,8 @@ static void load_kernel (CPUState *env)
ram_addr_t initrd_offset;
kernel_size = load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
- &entry, &kernel_low, &kernel_high);
+ (uint64_t *)&entry, (uint64_t *)&kernel_low,
+ (uint64_t *)&kernel_high);
if (kernel_size >= 0) {
if ((entry & ~0x7fffffffULL) == 0x80000000)
entry = (int32_t)entry;
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 8b3f4e93a3..1499af7866 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -83,7 +83,8 @@ static void load_kernel (CPUState *env)
ram_addr_t initrd_offset;
kernel_size = load_elf(loaderparams.kernel_filename, VIRT_TO_PHYS_ADDEND,
- &entry, &kernel_low, &kernel_high);
+ (uint64_t *)&entry, (uint64_t *)&kernel_low,
+ (uint64_t *)&kernel_high);
if (kernel_size >= 0) {
if ((entry & ~0x7fffffffULL) == 0x80000000)
entry = (int32_t)entry;
@@ -120,15 +121,15 @@ static void load_kernel (CPUState *env)
/* Store command line. */
if (initrd_size > 0) {
int ret;
- ret = sprintf(phys_ram_base + (16 << 20) - 256,
+ ret = sprintf((char *)(phys_ram_base + (16 << 20) - 256),
"rd_start=0x" TARGET_FMT_lx " rd_size=%li ",
PHYS_TO_VIRT((uint32_t)initrd_offset),
initrd_size);
- strcpy (phys_ram_base + (16 << 20) - 256 + ret,
+ strcpy ((char *)(phys_ram_base + (16 << 20) - 256 + ret),
loaderparams.kernel_cmdline);
}
else {
- strcpy (phys_ram_base + (16 << 20) - 256,
+ strcpy ((char *)(phys_ram_base + (16 << 20) - 256),
loaderparams.kernel_cmdline);
}
diff --git a/hw/nvram.h b/hw/nvram.h
index 3ec5483021..b346822c22 100644
--- a/hw/nvram.h
+++ b/hw/nvram.h
@@ -17,12 +17,12 @@ uint16_t NVRAM_get_word (nvram_t *nvram, uint32_t addr);
void NVRAM_set_lword (nvram_t *nvram, uint32_t addr, uint32_t value);
uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr);
void NVRAM_set_string (nvram_t *nvram, uint32_t addr,
- const unsigned char *str, uint32_t max);
+ const char *str, uint32_t max);
int NVRAM_get_string (nvram_t *nvram, uint8_t *dst, uint16_t addr, int max);
void NVRAM_set_crc (nvram_t *nvram, uint32_t addr,
uint32_t start, uint32_t count);
int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
- const unsigned char *arch,
+ const char *arch,
uint32_t RAM_size, int boot_device,
uint32_t kernel_image, uint32_t kernel_size,
const char *cmdline,
diff --git a/hw/pl080.c b/hw/pl080.c
index 059e667028..66d0398fda 100644
--- a/hw/pl080.c
+++ b/hw/pl080.c
@@ -80,7 +80,7 @@ static void pl080_run(pl080_state *s)
int src_id;
int dest_id;
int size;
- char buff[4];
+ uint8_t buff[4];
uint32_t req;
s->tc_mask = 0;
diff --git a/hw/ppc.c b/hw/ppc.c
index fc92ab2673..fd247aa87d 100644
--- a/hw/ppc.c
+++ b/hw/ppc.c
@@ -1305,7 +1305,7 @@ uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr)
}
void NVRAM_set_string (nvram_t *nvram, uint32_t addr,
- const unsigned char *str, uint32_t max)
+ const char *str, uint32_t max)
{
int i;
@@ -1366,7 +1366,7 @@ uint16_t NVRAM_compute_crc (nvram_t *nvram, uint32_t start, uint32_t count)
#define CMDLINE_ADDR 0x017ff000
int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
- const unsigned char *arch,
+ const char *arch,
uint32_t RAM_size, int boot_device,
uint32_t kernel_image, uint32_t kernel_size,
const char *cmdline,
@@ -1387,7 +1387,7 @@ int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size,
NVRAM_set_lword(nvram, 0x3C, kernel_size);
if (cmdline) {
/* XXX: put the cmdline in NVRAM too ? */
- strcpy(phys_ram_base + CMDLINE_ADDR, cmdline);
+ strcpy((char *)(phys_ram_base + CMDLINE_ADDR), cmdline);
NVRAM_set_lword(nvram, 0x40, CMDLINE_ADDR);
NVRAM_set_lword(nvram, 0x44, strlen(cmdline));
} else {
diff --git a/hw/ppc4xx.h b/hw/ppc4xx.h
index 8d7863c149..538e446804 100644
--- a/hw/ppc4xx.h
+++ b/hw/ppc4xx.h
@@ -26,7 +26,7 @@
#define PPC_4XX_H
/* PowerPC 4xx core initialization */
-CPUState *ppc4xx_init (const unsigned char *cpu_model,
+CPUState *ppc4xx_init (const char *cpu_model,
clk_setup_t *cpu_clk, clk_setup_t *tb_clk,
uint32_t sysclk);
diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c
index f9143dd4fd..ee821f5b5b 100644
--- a/hw/ppc4xx_devs.c
+++ b/hw/ppc4xx_devs.c
@@ -35,7 +35,7 @@ extern FILE *logfile;
/*****************************************************************************/
/* Generic PowerPC 4xx processor instanciation */
-CPUState *ppc4xx_init (const unsigned char *cpu_model,
+CPUState *ppc4xx_init (const char *cpu_model,
clk_setup_t *cpu_clk, clk_setup_t *tb_clk,
uint32_t sysclk)
{
diff --git a/hw/pxa2xx_dma.c b/hw/pxa2xx_dma.c
index 4e33c53173..8219392bbd 100644
--- a/hw/pxa2xx_dma.c
+++ b/hw/pxa2xx_dma.c
@@ -177,7 +177,7 @@ static void pxa2xx_dma_run(struct pxa2xx_dma_state_s *s)
uint32_t n, size;
uint32_t width;
uint32_t length;
- char buffer[32];
+ uint8_t buffer[32];
struct pxa2xx_dma_channel_s *ch;
if (s->running ++)
diff --git a/hw/usb-net.c b/hw/usb-net.c
index a4714c5bc3..82005af568 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -681,8 +681,8 @@ static int ndis_query(USBNetState *s, uint32_t oid,
/* mandatory */
case OID_GEN_VENDOR_DESCRIPTION:
- pstrcpy(outbuf, outlen, "QEMU USB RNDIS Net");
- return strlen(outbuf) + 1;
+ pstrcpy((char *)outbuf, outlen, "QEMU USB RNDIS Net");
+ return strlen((char *)outbuf) + 1;
case OID_GEN_VENDOR_DRIVER_VERSION:
*((le32 *) outbuf) = cpu_to_le32(1);