Skip to content

Commit

Permalink
linux-user/signal.c: Remove only-ever-set variable fpu_save_addr
Browse files Browse the repository at this point in the history
Move the access of fpu_save into the commented out skeleton code for
restoring FPU registers on SPARC sigreturn, thus silencing a gcc
4.6 "variable set but never used" warning.
(This doesn't affect the calculation of 'err' because in fact
__get_user() can never fail.)

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
  • Loading branch information
pm215 authored and suihkulokki committed Jun 21, 2011
1 parent 5945cfc commit 2aec3a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions linux-user/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,6 @@ long do_sigreturn(CPUState *env)
uint32_t up_psr, pc, npc;
target_sigset_t set;
sigset_t host_set;
abi_ulong fpu_save_addr;
int err, i;

sf_addr = env->regwptr[UREG_FP];
Expand Down Expand Up @@ -2120,10 +2119,11 @@ long do_sigreturn(CPUState *env)
err |= __get_user(env->regwptr[i + UREG_I0], &sf->info.si_regs.u_regs[i+8]);
}

err |= __get_user(fpu_save_addr, &sf->fpu_save);

//if (fpu_save)
// err |= restore_fpu_state(env, fpu_save);
/* FIXME: implement FPU save/restore:
* __get_user(fpu_save, &sf->fpu_save);
* if (fpu_save)
* err |= restore_fpu_state(env, fpu_save);
*/

/* This is pretty much atomic, no amount locking would prevent
* the races which exist anyways.
Expand Down

0 comments on commit 2aec3a2

Please sign in to comment.