Commit e7fb1406b06165daf7c06c6b08d2a10be51f7d1d

Authored by blueswir1
1 parent 0bbd4a0d

Fix some compiler signed/unsigned char warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4782 c046a42c-6fe2-441c-8c8c-71466251a162
hw/firmware_abi.h
... ... @@ -139,7 +139,7 @@ OpenBIOS_finish_partition(struct OpenBIOS_nvpart_v1 *header, uint32_t size)
139 139 }
140 140  
141 141 static inline uint32_t
142   -OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const unsigned char *str)
  142 +OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const char *str)
143 143 {
144 144 uint32_t len;
145 145  
... ...
hw/sun4m.c
... ... @@ -159,7 +159,7 @@ static int nvram_boot_set(void *opaque, const char *boot_device)
159 159 for (i = 0; i < sizeof(image); i++)
160 160 image[i] = m48t59_read(nvram, i) & 0xff;
161 161  
162   - strcpy(header->boot_devices, boot_device);
  162 + strcpy((char *)header->boot_devices, boot_device);
163 163 header->nboot_devices = strlen(boot_device) & 0xff;
164 164 header->crc = cpu_to_be16(OHW_compute_crc(header, 0x00, 0xF8));
165 165  
... ... @@ -187,17 +187,17 @@ static void nvram_init(m48t59_t *nvram, uint8_t *macaddr, const char *cmdline,
187 187 memset(image, '\0', sizeof(image));
188 188  
189 189 // Try to match PPC NVRAM
190   - strcpy(header->struct_ident, "QEMU_BIOS");
  190 + strcpy((char *)header->struct_ident, "QEMU_BIOS");
191 191 header->struct_version = cpu_to_be32(3); /* structure v3 */
192 192  
193 193 header->nvram_size = cpu_to_be16(0x2000);
194 194 header->nvram_arch_ptr = cpu_to_be16(sizeof(ohwcfg_v3_t));
195 195 header->nvram_arch_size = cpu_to_be16(sizeof(struct sparc_arch_cfg));
196   - strcpy(header->arch, arch);
  196 + strcpy((char *)header->arch, arch);
197 197 header->nb_cpus = smp_cpus & 0xff;
198 198 header->RAM0_base = 0;
199 199 header->RAM0_size = cpu_to_be64((uint64_t)RAM_size);
200   - strcpy(header->boot_devices, boot_devices);
  200 + strcpy((char *)header->boot_devices, boot_devices);
201 201 header->nboot_devices = strlen(boot_devices) & 0xff;
202 202 header->kernel_image = cpu_to_be64((uint64_t)KERNEL_LOAD_ADDR);
203 203 header->kernel_size = cpu_to_be64((uint64_t)kernel_size);
... ...
hw/sun4u.c
... ... @@ -78,7 +78,7 @@ static int nvram_boot_set(void *opaque, const char *boot_device)
78 78 for (i = 0; i < sizeof(image); i++)
79 79 image[i] = m48t59_read(nvram, i) & 0xff;
80 80  
81   - strcpy(header->boot_devices, boot_device);
  81 + strcpy((char *)header->boot_devices, boot_device);
82 82 header->nboot_devices = strlen(boot_device) & 0xff;
83 83 header->crc = cpu_to_be16(OHW_compute_crc(header, 0x00, 0xF8));
84 84  
... ... @@ -91,7 +91,7 @@ static int nvram_boot_set(void *opaque, const char *boot_device)
91 91 extern int nographic;
92 92  
93 93 static int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size,
94   - const unsigned char *arch,
  94 + const char *arch,
95 95 ram_addr_t RAM_size,
96 96 const char *boot_devices,
97 97 uint32_t kernel_image, uint32_t kernel_size,
... ... @@ -110,17 +110,17 @@ static int sun4u_NVRAM_set_params (m48t59_t *nvram, uint16_t NVRAM_size,
110 110 memset(image, '\0', sizeof(image));
111 111  
112 112 // Try to match PPC NVRAM
113   - strcpy(header->struct_ident, "QEMU_BIOS");
  113 + strcpy((char *)header->struct_ident, "QEMU_BIOS");
114 114 header->struct_version = cpu_to_be32(3); /* structure v3 */
115 115  
116 116 header->nvram_size = cpu_to_be16(NVRAM_size);
117 117 header->nvram_arch_ptr = cpu_to_be16(sizeof(ohwcfg_v3_t));
118 118 header->nvram_arch_size = cpu_to_be16(sizeof(struct sparc_arch_cfg));
119   - strcpy(header->arch, arch);
  119 + strcpy((char *)header->arch, arch);
120 120 header->nb_cpus = smp_cpus & 0xff;
121 121 header->RAM0_base = 0;
122 122 header->RAM0_size = cpu_to_be64((uint64_t)RAM_size);
123   - strcpy(header->boot_devices, boot_devices);
  123 + strcpy((char *)header->boot_devices, boot_devices);
124 124 header->nboot_devices = strlen(boot_devices) & 0xff;
125 125 header->kernel_image = cpu_to_be64((uint64_t)kernel_image);
126 126 header->kernel_size = cpu_to_be64((uint64_t)kernel_size);
... ...