From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XowW8-0004s4-G0 for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XowVz-0007o9-76 for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:41:04 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:59940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XowVy-0007nv-MF for qemu-devel@nongnu.org; Thu, 13 Nov 2014 10:40:55 -0500 Received: by mail-wi0-f180.google.com with SMTP id hi2so8660632wib.13 for ; Thu, 13 Nov 2014 07:40:54 -0800 (PST) Received: from playground.station (net-37-117-142-149.cust.vodafonedsl.it. [37.117.142.149]) by mx.google.com with ESMTPSA id u13sm26168441wiv.10.2014.11.13.07.40.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 07:40:53 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 13 Nov 2014 16:40:25 +0100 Message-Id: <1415893228-25823-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1415893228-25823-1-git-send-email-pbonzini@redhat.com> References: <1415893228-25823-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 10/13] target-i386: fix Coverity complaints about overflows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- target-i386/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 1b2c12a..015f5b5 100644 --- 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, - int sipi_vector) + uint8_t sipi_vector) { CPUState *cs = CPU(cpu); CPUX86State *env = &cpu->env; -- 1.8.3.1