* [Qemu-devel] [PATCH 1/6] remove two dead assignments in target-i386/translate.c
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 2/6] fix undefined shifts by >32 Paolo Bonzini
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-i386/translate.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 8078112..a597e80 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -4692,8 +4692,6 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
ot = dflag + OT_WORD;
modrm = ldub_code(s->pc++);
- mod = (modrm >> 6) & 3;
- rm = (modrm & 7) | REX_B(s);
reg = ((modrm >> 3) & 7) | rex_r;
gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/6] fix undefined shifts by >32
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 1/6] remove two dead assignments in target-i386/translate.c Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 3/6] exec.c: dead assignments Paolo Bonzini
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
vl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index 5e8c775..d9f1ccb 100644
--- a/vl.c
+++ b/vl.c
@@ -2373,9 +2373,9 @@ static void numa_add(const char *optarg)
fprintf(stderr,
"only 63 CPUs in NUMA mode supported.\n");
}
- value = (1 << (endvalue + 1)) - (1 << value);
+ value = (2ULL << endvalue) - (1ULL << value);
} else {
- value = 1 << value;
+ value = 1ULL << value;
}
}
node_cpumask[nodenr] = value;
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 3/6] exec.c: dead assignments
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 1/6] remove two dead assignments in target-i386/translate.c Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 2/6] fix undefined shifts by >32 Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 4/6] vnc.c: remove dead code Paolo Bonzini
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
exec.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/exec.c b/exec.c
index 1190591..64109a7 100644
--- a/exec.c
+++ b/exec.c
@@ -2489,17 +2489,13 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
ram_addr_t qemu_ram_addr_from_host(void *ptr)
{
RAMBlock *prev;
- RAMBlock **prevp;
RAMBlock *block;
uint8_t *host = ptr;
prev = NULL;
- prevp = &ram_blocks;
block = ram_blocks;
while (block && (block->host > host
|| block->host + block->length <= host)) {
- if (prev)
- prevp = &prev->next;
prev = block;
block = block->next;
}
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 4/6] vnc.c: remove dead code
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
` (2 preceding siblings ...)
2010-01-27 13:54 ` [Qemu-devel] [PATCH 3/6] exec.c: dead assignments Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 5/6] usb-linux.c: remove write-only variable Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 6/6] fix audio_bug related clang false positives Paolo Bonzini
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
to= has always been handled by qemu-sockets.c's inet_listen, not by vnc.c.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
vnc.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/vnc.c b/vnc.c
index cc2a26e..69d6624 100644
--- a/vnc.c
+++ b/vnc.c
@@ -2535,7 +2535,6 @@ int vnc_display_open(DisplayState *ds, const char *display)
const char *options;
int password = 0;
int reverse = 0;
- int to_port = 0;
#ifdef CONFIG_VNC_TLS
int tls = 0, x509 = 0;
#endif
@@ -2561,8 +2560,6 @@ int vnc_display_open(DisplayState *ds, const char *display)
password = 1; /* Require password auth */
} else if (strncmp(options, "reverse", 7) == 0) {
reverse = 1;
- } else if (strncmp(options, "to=", 3) == 0) {
- to_port = atoi(options+3) + 5900;
#ifdef CONFIG_VNC_SASL
} else if (strncmp(options, "sasl", 4) == 0) {
sasl = 1; /* Require SASL auth */
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 5/6] usb-linux.c: remove write-only variable
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
` (3 preceding siblings ...)
2010-01-27 13:54 ` [Qemu-devel] [PATCH 4/6] vnc.c: remove dead code Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
2010-01-27 13:54 ` [Qemu-devel] [PATCH 6/6] fix audio_bug related clang false positives Paolo Bonzini
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
usb-linux.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/usb-linux.c b/usb-linux.c
index 1aaa595..ba8facf 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -1007,11 +1007,9 @@ USBDevice *usb_host_device_open(const char *devname)
{
struct USBAutoFilter filter;
USBDevice *dev;
- USBHostDevice *s;
char *p;
dev = usb_create(NULL /* FIXME */, "usb-host");
- s = DO_UPCAST(USBHostDevice, dev, dev);
if (strstr(devname, "auto:")) {
if (parse_filter(devname, &filter) < 0)
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 6/6] fix audio_bug related clang false positives
2010-01-27 13:54 [Qemu-devel] [PATCH 0/6] fix a few clang warnings Paolo Bonzini
` (4 preceding siblings ...)
2010-01-27 13:54 ` [Qemu-devel] [PATCH 5/6] usb-linux.c: remove write-only variable Paolo Bonzini
@ 2010-01-27 13:54 ` Paolo Bonzini
5 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-01-27 13:54 UTC (permalink / raw)
To: qemu-devel
By making the abort condition visible in the caller, this fixes
several false positives in the audio code.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
audio/audio.c | 44 ++++++++++++++++++++------------------------
audio/audio_int.h | 3 ++-
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/audio/audio.c b/audio/audio.c
index 2a20e5b..7fce46c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -118,42 +118,38 @@ struct mixeng_volume nominal_volume = {
static void audio_print_options (const char *prefix,
struct audio_option *opt);
-int audio_bug (const char *funcname, int cond)
+void audio_bug_found (const char *funcname)
{
- if (cond) {
- static int shown;
-
- AUD_log (NULL, "A bug was just triggered in %s\n", funcname);
- if (!shown) {
- struct audio_driver *d;
-
- shown = 1;
- AUD_log (NULL, "Save all your work and restart without audio\n");
- AUD_log (NULL, "Please send bug report to av1474@comtv.ru\n");
- AUD_log (NULL, "I am sorry\n");
- d = glob_audio_state.drv;
- if (d) {
- audio_print_options (d->name, d->options);
- }
+ static int shown;
+
+ AUD_log (NULL, "A bug was just triggered in %s\n", funcname);
+ if (!shown) {
+ struct audio_driver *d;
+
+ shown = 1;
+ AUD_log (NULL, "Save all your work and restart without audio\n");
+ AUD_log (NULL, "Please send bug report to av1474@comtv.ru\n");
+ AUD_log (NULL, "I am sorry\n");
+ d = glob_audio_state.drv;
+ if (d) {
+ audio_print_options (d->name, d->options);
}
- AUD_log (NULL, "Context:\n");
+ }
+ AUD_log (NULL, "Context:\n");
#if defined AUDIO_BREAKPOINT_ON_BUG
# if defined HOST_I386
# if defined __GNUC__
- __asm__ ("int3");
+ __asm__ ("int3");
# elif defined _MSC_VER
- _asm _emit 0xcc;
+ _asm _emit 0xcc;
# else
- abort ();
+ abort ();
# endif
# else
- abort ();
+ abort ();
# endif
#endif
- }
-
- return cond;
}
#endif
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 06e313f..4244615 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -223,7 +223,8 @@ int audio_pcm_sw_read (SWVoiceIn *sw, void *buf, int len);
int audio_pcm_hw_clip_out (HWVoiceOut *hw, void *pcm_buf,
int live, int pending);
-int audio_bug (const char *funcname, int cond);
+#define audio_bug(funcname, cond) ((cond) ? audio_bug_found (funcname), 1 : 0)
+void audio_bug_found (const char *funcname);
void *audio_calloc (const char *funcname, int nmemb, size_t size);
void audio_run (const char *msg);
--
1.6.6
^ permalink raw reply related [flat|nested] 8+ messages in thread