Prev: [tip:x86/gcc46] x86, gcc-4.6: Fix set but not read variables
Next: drivers/gpu/drm/radeon/r600_blit.c: fix possible NULL pointer derefernce
From: tip-bot for Andi Kleen on 20 Jul 2010 20:00 Commit-ID: 5f755293ca61520b70b11afe1b1d6e1635cb6c00 Gitweb: http://git.kernel.org/tip/5f755293ca61520b70b11afe1b1d6e1635cb6c00 Author: Andi Kleen <andi(a)firstfloor.org> AuthorDate: Tue, 20 Jul 2010 15:19:48 -0700 Committer: H. Peter Anvin <hpa(a)linux.intel.com> CommitDate: Tue, 20 Jul 2010 15:38:18 -0700 x86, gcc-4.6: Avoid unused by set variables in rdmsr Avoids quite a lot of warnings with a gcc 4.6 -Wall build because this happens in a commonly used header file (apic.h) Signed-off-by: Andi Kleen <ak(a)linux.intel.com> LKML-Reference: <201007202219.o6KMJme6021066(a)imap1.linux-foundation.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa(a)linux.intel.com> --- arch/x86/include/asm/msr.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index c5bc4c2..084ef95 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -148,8 +148,8 @@ static inline unsigned long long native_read_pmc(int counter) #define rdmsr(msr, val1, val2) \ do { \ u64 __val = native_read_msr((msr)); \ - (val1) = (u32)__val; \ - (val2) = (u32)(__val >> 32); \ + (void)((val1) = (u32)__val); \ + (void)((val2) = (u32)(__val >> 32)); \ } while (0) static inline void wrmsr(unsigned msr, unsigned low, unsigned high) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |