From 7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Sun, 14 Sep 2008 06:45:34 +0000 Subject: Fix warnings that would be caused by gcc flag -Wwrite-strings git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/e1000.c | 2 +- hw/sh.h | 2 +- hw/tc58128.c | 4 ++-- hw/usb-net.c | 2 +- hw/usb-ohci.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'hw') diff --git a/hw/e1000.c b/hw/e1000.c index d52f1f0..a8dcd1a 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -949,7 +949,7 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn) E1000State *d; uint8_t *pci_conf; uint16_t checksum = 0; - char *info_str = "e1000"; + static const char info_str[] = "e1000"; int i; d = (E1000State *)pci_register_device(bus, "e1000", diff --git a/hw/sh.h b/hw/sh.h index 808ea50..50a1ae9 100644 --- a/hw/sh.h +++ b/hw/sh.h @@ -43,6 +43,6 @@ void sh_serial_init (target_phys_addr_t base, int feat, struct intc_source *bri_source); /* tc58128.c */ -int tc58128_init(struct SH7750State *s, char *zone1, char *zone2); +int tc58128_init(struct SH7750State *s, const char *zone1, const char *zone2); #endif diff --git a/hw/tc58128.c b/hw/tc58128.c index 2cd176b..37f5419 100644 --- a/hw/tc58128.c +++ b/hw/tc58128.c @@ -26,7 +26,7 @@ static tc58128_dev tc58128_devs[2]; #define FLASH_SIZE (16*1024*1024) -void init_dev(tc58128_dev * dev, char *filename) +static void init_dev(tc58128_dev * dev, const char *filename) { int ret, blocks; @@ -175,7 +175,7 @@ static sh7750_io_device tc58128 = { tc58128_cb /* Callback */ }; -int tc58128_init(struct SH7750State *s, char *zone1, char *zone2) +int tc58128_init(struct SH7750State *s, const char *zone1, const char *zone2) { init_dev(&tc58128_devs[0], zone1); init_dev(&tc58128_devs[1], zone2); diff --git a/hw/usb-net.c b/hw/usb-net.c index 63edfd5..a4714c5 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -1016,7 +1016,7 @@ static void usb_net_handle_reset(USBDevice *dev) { } -static char *usb_net_stringtable[] = { +static const char * const usb_net_stringtable[] = { [STRING_MANUFACTURER] = "QEMU", [STRING_PRODUCT] = "RNDIS/QEMU USB Network Device", [STRING_ETHADDR] = "400102030405", diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index afd5506..55cb77b 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -565,7 +565,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed, { int dir; size_t len = 0; - char *str = NULL; + const char *str = NULL; int pid; int ret; int i; @@ -800,7 +800,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) { int dir; size_t len = 0; - char *str = NULL; + const char *str = NULL; int pid; int ret; int i; -- cgit v1.1