Skip to contentSkip to conversation

target-mips: Remove assignment to a variable which is never used

PATCH Applied Stefan Weil 3 participants 5 messages Jul 25, 2013 – Jul 29, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-mips: Remove assignment to a variable which is never used

This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many extra warnings.

---
 target-mips/op_helper.c |    1 -
 1 file changed, 1 deletion(-)
target-mips/op_helper.c +0 -1
index 5cf1c3f..b828375 100644
@@ -1735,7 +1735,6 @@ target_ulong helper_evpe(CPUMIPSState *env)
 void helper_fork(target_ulong arg1, target_ulong arg2)
 {
     // arg1 = rt, arg2 = rs
-    arg1 = 0;
     // TODO: store to TC register
 }
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Stefan Weil

This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many extra warnings.

Thanks, applied to the trivial patches queue.

/mjt

#2 lore raw
In reply to Stefan Weil
Quoted 16 lines · Stefan Weil

This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many extra warnings.

---
 target-mips/op_helper.c |    1 -
 1 file changed, 1 deletion(-)
target-mips/op_helper.c +0 -0
index 5cf1c3f..b828375 100644

target-mips/op_helper.c target_ulong helper_evpe(CPUMIPSState *env) · line 1740

Quoted 7 lines
target-mips/op_helper.c +0 -1
@@ -1735,7 +1735,6 @@ target_ulong helper_evpe(CPUMIPSState *env)
 void helper_fork(target_ulong arg1, target_ulong arg2)
 {
     // arg1 = rt, arg2 = rs
-    arg1 = 0;
     // TODO: store to TC register
 }
 

Thanks, applied.

Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
#3 lore raw
Quoted 12 lines · Aurelien Jarno
Quoted 11 lines · Stefan Weil

This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many extra warnings.

---
  target-mips/op_helper.c |    1 -
  1 file changed, 1 deletion(-)
Quoted 13 lines

target-mips/op_helper.c target_ulong helper_evpe(CPUMIPSState *env) · line 1739

Quoted 11 lines
target-mips/op_helper.c +0 -1
index 5cf1c3f..b828375 100644
@@ -1735,7 +1735,6 @@ target_ulong helper_evpe(CPUMIPSState *env)
  void helper_fork(target_ulong arg1, target_ulong arg2)
  {
      // arg1 = rt, arg2 = rs
-    arg1 = 0;
      // TODO: store to TC register
  }

Thanks, applied.

FWIW, you're applying this (and "linux-user: correct argument number ..") 3 days after I sent a pull request for trivial-patches which includes these patches.

Should I rebase and re-issue my pull request now?

Thanks,

/mjt

#4 lore raw
Quoted 27 lines · Michael Tokarev
Quoted 12 lines · Aurelien Jarno
Quoted 11 lines · Stefan Weil

This assignment causes a compiler warning for compilations with the compiler option -Wunused-but-set-variable (which is included with -Wextra).

Removing it allows using -Wextra for QEMU code without suppressing too many extra warnings.

---
 target-mips/op_helper.c |    1 -
 1 file changed, 1 deletion(-)
Quoted 13 lines

target-mips/op_helper.c target_ulong helper_evpe(CPUMIPSState *env) · line 1739

Quoted 11 lines
target-mips/op_helper.c +0 -1
index 5cf1c3f..b828375 100644
@@ -1735,7 +1735,6 @@ target_ulong helper_evpe(CPUMIPSState *env)
 void helper_fork(target_ulong arg1, target_ulong arg2)
 {
     // arg1 = rt, arg2 = rs
-    arg1 = 0;
     // TODO: store to TC register
 }

Thanks, applied.

Quoted 3 lines

FWIW, you're applying this (and "linux-user: correct argument number ..") 3 days after I sent a pull request for trivial-patches which includes these patches.

Sorry about that, I haven't seen it was applied to this tree.

Quoted 1 line

Should I rebase and re-issue my pull request now?

Git is smart enough to handle that, you don't need to redo the pull request, which btw I have pulled.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net