From b920df5c79f64fe9617ef070cd6bda1738172f84 Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Wed, 7 Mar 2012 23:36:43 +0800 Subject: Remove type field in ModuleEntry as it's not used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Chen Yufei Acked-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- module.c | 1 - 1 file changed, 1 deletion(-) diff --git a/module.c b/module.c index 106a969449..c3a6da7a86 100644 --- a/module.c +++ b/module.c @@ -19,7 +19,6 @@ typedef struct ModuleEntry { - module_init_type type; void (*init)(void); QTAILQ_ENTRY(ModuleEntry) node; } ModuleEntry; -- cgit v1.2.3 From ee032ca146e932ce616aff7762596a10bf24ecac Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 8 Mar 2012 22:58:06 +0100 Subject: vnc: Fix packed boolean struct members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes warnings reported by splint: For variables which are packed in a single bit, a signed data type like 'int' does not make much sense. There is no obvious reason why the two values should be packed, so I removed the packing and changed the data type to bool because both are used as boolean values. v2: Some versions of gcc complain after this modification, for example gcc (Debian 4.4.5-8) 4.4.5): ui/vnc-auth-sasl.c: In function ‘vnc_sasl_client_cleanup’: ui/vnc-auth-sasl.c:34: error: suggest parentheses around assignment used as truth value Obviously, the compiler does not like code which does bool = unsigned = bool = 0 Splitting that code in three statements works. Cc: Anthony Liguori Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- ui/vnc-auth-sasl.c | 4 +++- ui/vnc-auth-sasl.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c index e2045fc0b8..8fba7702c2 100644 --- a/ui/vnc-auth-sasl.c +++ b/ui/vnc-auth-sasl.c @@ -31,7 +31,9 @@ void vnc_sasl_client_cleanup(VncState *vs) { if (vs->sasl.conn) { - vs->sasl.runSSF = vs->sasl.waitWriteSSF = vs->sasl.wantSSF = 0; + vs->sasl.runSSF = false; + vs->sasl.wantSSF = false; + vs->sasl.waitWriteSSF = 0; vs->sasl.encodedLength = vs->sasl.encodedOffset = 0; vs->sasl.encoded = NULL; g_free(vs->sasl.username); diff --git a/ui/vnc-auth-sasl.h b/ui/vnc-auth-sasl.h index fd9b18a8fe..ee243a9d64 100644 --- a/ui/vnc-auth-sasl.h +++ b/ui/vnc-auth-sasl.h @@ -37,9 +37,9 @@ typedef struct VncDisplaySASL VncDisplaySASL; struct VncStateSASL { sasl_conn_t *conn; /* If we want to negotiate an SSF layer with client */ - int wantSSF :1; + bool wantSSF; /* If we are now running the SSF layer */ - int runSSF :1; + bool runSSF; /* * If this is non-zero, then wait for that many bytes * to be written plain, before switching to SSF encoding -- cgit v1.2.3 From fbac6a7d35d119a52606c175aface9bcec805f09 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 14:50:25 +0100 Subject: ds1338: Add missing break statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the break statement, case 5 sets month and year from the same data. This does not look correct. The missing break was reported by splint. Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- hw/ds1338.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ds1338.c b/hw/ds1338.c index 6397f0aa6f..d590d9c007 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -100,6 +100,7 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data) break; case 5: s->now.tm_mon = from_bcd(data & 0x1f) - 1; + break; case 6: s->now.tm_year = from_bcd(data) + 100; break; -- cgit v1.2.3 From c07c163e0e8cd89ab916774064f26a756eee08e9 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Mon, 12 Mar 2012 14:13:57 -0400 Subject: monitor: Remove unused bool field 'qapi' in mon_cmd_t struct Some minor code cleanup: the 'qapi' bool field in mon_cmd_t is unused, and can be removed. Signed-off-by: Jeff Cody Acked-by: Luiz Capitulino Signed-off-by: Stefan Hajnoczi --- monitor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/monitor.c b/monitor.c index d57e7bf61d..e71a141dd1 100644 --- a/monitor.c +++ b/monitor.c @@ -128,7 +128,6 @@ typedef struct mon_cmd_t { int (*cmd_async)(Monitor *mon, const QDict *params, MonitorCompletion *cb, void *opaque); } mhandler; - bool qapi; int flags; } mon_cmd_t; -- cgit v1.2.3 From 039f835efcc34a89e1d81a726d751b1718b3791c Mon Sep 17 00:00:00 2001 From: Joshua Housh Date: Tue, 13 Mar 2012 13:28:47 -0500 Subject: cleanup obsolete typedef There are no users of i2c_slave. Signed-off-by: Joshua Housh Signed-off-by: Mark Langsdorf Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- qemu-common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/qemu-common.h b/qemu-common.h index b0fdf5c2b4..c9e96a808e 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -236,7 +236,6 @@ typedef struct MACAddr MACAddr; typedef struct VLANState VLANState; typedef struct VLANClientState VLANClientState; typedef struct i2c_bus i2c_bus; -typedef struct i2c_slave i2c_slave; typedef struct ISABus ISABus; typedef struct SMBusDevice SMBusDevice; typedef struct PCIHostState PCIHostState; -- cgit v1.2.3 From 720f9f582533b2274ee2f1dd0337feb983e2d510 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 19 Mar 2012 15:58:45 +1100 Subject: .gitignore: add qemu-bridge-helper and option rom build products This adds a few previously missing generated files to .gitignore: the qemu-bridge-helper binary, and more generated versions of the linuxboot, multiboot and kvmvapic roms from pc-bios/optionrom. Signed-off-by: David Gibson Signed-off-by: Stefan Hajnoczi --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 81b1510297..9859c7d746 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ qemu-img-cmds.texi qemu-img-cmds.h qemu-io qemu-ga +qemu-bridge-helper qemu-monitor.texi QMP/qmp-commands.txt test-coroutine @@ -75,9 +76,14 @@ patches pc-bios/bios-pq/status pc-bios/vgabios-pq/status pc-bios/optionrom/linuxboot.bin +pc-bios/optionrom/linuxboot.raw +pc-bios/optionrom/linuxboot.img pc-bios/optionrom/multiboot.bin pc-bios/optionrom/multiboot.raw +pc-bios/optionrom/multiboot.img pc-bios/optionrom/kvmvapic.bin +pc-bios/optionrom/kvmvapic.raw +pc-bios/optionrom/kvmvapic.img .stgit-* cscope.* tags -- cgit v1.2.3 From 0c1f781b7c8ddd79ca15c20b59afa2be69d18295 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Mon, 19 Mar 2012 11:19:57 +0800 Subject: ioapic: fix build with DEBUG_IOAPIC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ioapic.c:198: error: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ Signed-off-by: Jason Wang Reviewed-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- hw/ioapic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 3fee0114d9..e2e4796bb5 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -195,7 +195,7 @@ ioapic_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val, if (size != 4) { break; } - DPRINTF("write: %08x = %08x\n", s->ioregsel, val); + DPRINTF("write: %08x = %08" PRIx64 "\n", s->ioregsel, val); switch (s->ioregsel) { case IOAPIC_REG_ID: s->id = (val >> IOAPIC_ID_SHIFT) & IOAPIC_ID_MASK; -- cgit v1.2.3 From b71706d122838d9656e1a6dae80e22401babdf37 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Thu, 15 Mar 2012 14:26:18 -0400 Subject: qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() In the function ga_channel_write(), the handle ov.hEvent is created by the call to CreateEvent(). However, the handle is not closed prior to the function return. This patch closes the handle before the return of the function. Kudos to Paolo Bonzini for spotting this bug. Signed-off-by: Jeff Cody Acked-by: Michael Roth Signed-off-by: Stefan Hajnoczi --- qga/channel-win32.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qga/channel-win32.c b/qga/channel-win32.c index 190251bb57..16bf44a376 100644 --- a/qga/channel-win32.c +++ b/qga/channel-win32.c @@ -259,6 +259,10 @@ static GIOStatus ga_channel_write(GAChannel *c, const char *buf, size_t size, *count = written; } + if (ov.hEvent) { + CloseHandle(ov.hEvent); + ov.hEvent = NULL; + } return status; } -- cgit v1.2.3