projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2c0014
)
target-i386: fix Coverity complaints about overflows
author
Paolo Bonzini
<pbonzini@redhat.com>
Wed, 12 Nov 2014 11:16:58 +0000
(12:16 +0100)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Thu, 13 Nov 2014 15:13:27 +0000
(16:13 +0100)
sipi_vector is an int; it is shifted by 12 and passed as a 64-bit value,
which makes Coverity think that we wanted (uint64_t)sipi_vector << 12.
But actually it must be between 0 and 255. Make this explicit.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386/cpu.h
patch
|
blob
|
history
diff --git
a/target-i386/cpu.h
b/target-i386/cpu.h
index 1b2c12ad9465ecc47921272206eb9fc3416e9437..015f5b5276298ecdb3b90c538d0f507bd575fcbb 100644
(file)
--- a/
target-i386/cpu.h
+++ b/
target-i386/cpu.h
@@
-1104,7
+1104,7
@@
static inline void cpu_x86_load_seg_cache(CPUX86State *env,
}
static inline void cpu_x86_load_seg_cache_sipi(X86CPU *cpu,
-
in
t sipi_vector)
+
uint8_
t sipi_vector)
{
CPUState *cs = CPU(cpu);
CPUX86State *env = &cpu->env;