[PATCH] x86, paravirt: Avoid unused by set variables in rdmsr

From: Lucas De Marchi
Date: Thu May 12 2011 - 13:07:49 EST


Just like 5f755293 (x86, gcc-4.6: Avoid unused by set variables in
rdmsr) this patch silences GCC warnings about "set but not used
variables" in paravirt.h.

Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx>
---
arch/x86/include/asm/paravirt.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index ebbc4d8..1e02d57 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -147,8 +147,8 @@ static inline int paravirt_wrmsr_regs(u32 *regs)
do { \
int _err; \
u64 _l = paravirt_read_msr(msr, &_err); \
- val1 = (u32)_l; \
- val2 = _l >> 32; \
+ (void)((val1) = (u32)_l); \
+ (void)((val2) = (u32)(_l >> 32)); \
} while (0)

#define wrmsr(msr, val1, val2) \
--
1.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/