提交 c726b822 编写于 作者: D David Daney 提交者: Ralf Baechle

MIPS: Fix GCC-4.6 'set but not used' warning in signal*.c

GCC-4.6 can find more unused code than previous versions could.

In the case of protected_restore_fp_context{,32}, the variable tmp is
really used.  Its use is tricky in that we really care about the side
effects of the __put_user() calls.  So we must mark tmp with
__maybe_unused to quiet the warning.
Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2035/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 a18059ac
...@@ -84,7 +84,7 @@ static int protected_save_fp_context(struct sigcontext __user *sc) ...@@ -84,7 +84,7 @@ static int protected_save_fp_context(struct sigcontext __user *sc)
static int protected_restore_fp_context(struct sigcontext __user *sc) static int protected_restore_fp_context(struct sigcontext __user *sc)
{ {
int err, tmp; int err, tmp __maybe_unused;
while (1) { while (1) {
lock_fpu_owner(); lock_fpu_owner();
own_fpu_inatomic(0); own_fpu_inatomic(0);
......
...@@ -115,7 +115,7 @@ static int protected_save_fp_context32(struct sigcontext32 __user *sc) ...@@ -115,7 +115,7 @@ static int protected_save_fp_context32(struct sigcontext32 __user *sc)
static int protected_restore_fp_context32(struct sigcontext32 __user *sc) static int protected_restore_fp_context32(struct sigcontext32 __user *sc)
{ {
int err, tmp; int err, tmp __maybe_unused;
while (1) { while (1) {
lock_fpu_owner(); lock_fpu_owner();
own_fpu_inatomic(0); own_fpu_inatomic(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册