summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 06:45:34 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 06:45:34 +0000
commit7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8 (patch)
tree29ccfd792bcd8109ef331d031b6f04d89b99b310 /hw
parent5d0c5750bb19212c8ecfb9660956611baf6aa861 (diff)
downloadqemu-7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8.tar.gz
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
Diffstat (limited to 'hw')
-rw-r--r--hw/e1000.c2
-rw-r--r--hw/sh.h2
-rw-r--r--hw/tc58128.c4
-rw-r--r--hw/usb-net.c2
-rw-r--r--hw/usb-ohci.c4
5 files changed, 7 insertions, 7 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index d52f1f03b1..a8dcd1ad6c 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 808ea50bda..50a1ae961f 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 2cd176b945..37f5419582 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 63edfd5450..a4714c5bc3 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 afd55067d4..55cb77b79a 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;