Lucas De Marchi
2011-May-12 17:08 UTC
[PATCH] x86, paravirt: Avoid unused by set variables in rdmsr
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 at profusion.mobi> --- 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