qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/5] sparc: fix expression with uninitialized initia


From: blauwirbel
Subject: [Qemu-devel] [PATCH 2/5] sparc: fix expression with uninitialized initial value
Date: Mon, 30 Jul 2012 16:04:32 +0000

From: Blue Swirl <address@hidden>

err was uninitalized, it's not OK to use |=. Spotted by Clang
compiler.

Fix by replacing |= by =.

Signed-off-by: Blue Swirl <address@hidden>
---
 linux-user/signal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 97f30d9..3d6b5df 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2061,7 +2061,7 @@ restore_fpu_state(CPUSPARCState *env, qemu_siginfo_fpu_t 
*fpu)
         err = __copy_from_user(&env->fpr[0], &fpu->si_float_regs[0],
                                     (sizeof(unsigned long) * 32));
 #endif
-        err |= __get_user(env->fsr, &fpu->si_fsr);
+        err = __get_user(env->fsr, &fpu->si_fsr);
 #if 0
         err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth);
         if (current->thread.fpqdepth != 0)
-- 
1.7.2.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]