sparc: fix expression with uninitialized initial value
err was uninitialized, it's not OK to use |=. Spotted by Clang compiler. Fix by implementing the earlier statement which initializes the variable. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
acfbe712df
commit
8954bae3ce
|
@ -1844,7 +1844,7 @@ typedef struct {
|
||||||
} __siginfo_t;
|
} __siginfo_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long si_float_regs [32];
|
abi_ulong si_float_regs[32];
|
||||||
unsigned long si_fsr;
|
unsigned long si_fsr;
|
||||||
unsigned long si_fpqdepth;
|
unsigned long si_fpqdepth;
|
||||||
struct {
|
struct {
|
||||||
|
@ -2056,11 +2056,9 @@ restore_fpu_state(CPUSPARCState *env, qemu_siginfo_fpu_t *fpu)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* XXX: incorrect */
|
/* XXX: incorrect */
|
||||||
err = __copy_from_user(&env->fpr[0], &fpu->si_float_regs[0],
|
err = copy_from_user(&env->fpr[0], fpu->si_float_regs[0],
|
||||||
(sizeof(unsigned long) * 32));
|
(sizeof(abi_ulong) * 32));
|
||||||
#endif
|
|
||||||
err |= __get_user(env->fsr, &fpu->si_fsr);
|
err |= __get_user(env->fsr, &fpu->si_fsr);
|
||||||
#if 0
|
#if 0
|
||||||
err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth);
|
err |= __get_user(current->thread.fpqdepth, &fpu->si_fpqdepth);
|
||||||
|
|
Loading…
Reference in New Issue