Skip to contentSkip to conversation

qemu: keep cpu_model as a constant string

PATCH New Carlo Marcelo Arenas Belon 1 participant 1 message Mar 6, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu: keep cpu_model as a constant string

Fixes :

qemu/hw/pc.c: In function `pc_init1':
qemu/hw/pc.c:1029: warning: passing arg 1 of `qemu_system_hot_add_init' discards qualifiers from pointer target type

---
 qemu/hw/acpi.c |    4 ++--
 qemu/sysemu.h  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
qemu/hw/acpi.c +2 -2
index e44c8b5..a85efe7 100644
@@ -614,9 +614,9 @@ static void gpe_writeb(void *opaque, uint32_t addr, uint32_t val)
 #endif
 }
 
-static char *model;
+static const char *model;
 
-void qemu_system_hot_add_init(char *cpu_model)
+void qemu_system_hot_add_init(const char *cpu_model)
 {
     register_ioport_write(GPE_BASE, 4, 1, gpe_writeb, &gpe);
     register_ioport_read(GPE_BASE, 4, 1,  gpe_readb, &gpe);
qemu/sysemu.h +1 -1
index 73c57ab..9388fe4 100644
@@ -154,7 +154,7 @@ extern int drive_get_max_bus(BlockInterfaceType type);
 
 /* acpi */
 void qemu_system_cpu_hot_add(int cpu, int state);
-void qemu_system_hot_add_init(char *cpu_model);
+void qemu_system_hot_add_init(const char *cpu_model);
 
 /* vmchannel devices */
 
Signature · 7 lines
1.5.3.7


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/