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

login
register
mail settings
Submitter Stefan Weil
Date July 25, 2013, 8:10 p.m.
Message ID <1374783031-26633-1-git-send-email-sw@weilnetz.de>
Download mbox | patch
Permalink /patch/261920/
State Accepted
Headers show

Comments

Stefan Weil - July 25, 2013, 8:10 p.m.
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.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 target-mips/op_helper.c |    1 -
 1 file changed, 1 deletion(-)
Michael Tokarev - July 27, 2013, 7:22 a.m.
26.07.2013 00:10, Stefan Weil wrote:
> 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
Aurelien Jarno - July 28, 2013, 10:37 p.m.
On Thu, Jul 25, 2013 at 10:10:31PM +0200, Stefan Weil wrote:
> 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.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  target-mips/op_helper.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
> index 5cf1c3f..b828375 100644
> --- a/target-mips/op_helper.c
> +++ b/target-mips/op_helper.c
> @@ -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.
Michael Tokarev - July 29, 2013, 6:13 a.m.
On 29.07.2013 02:37, Aurelien Jarno wrote:
> On Thu, Jul 25, 2013 at 10:10:31PM +0200, Stefan Weil wrote:
>> 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.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>   target-mips/op_helper.c |    1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
>> index 5cf1c3f..b828375 100644
>> --- a/target-mips/op_helper.c
>> +++ b/target-mips/op_helper.c
>> @@ -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
Aurelien Jarno - July 29, 2013, 7:41 a.m.
On Mon, Jul 29, 2013 at 10:13:31AM +0400, Michael Tokarev wrote:
> On 29.07.2013 02:37, Aurelien Jarno wrote:
> >On Thu, Jul 25, 2013 at 10:10:31PM +0200, Stefan Weil wrote:
> >>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.
> >>
> >>Signed-off-by: Stefan Weil <sw@weilnetz.de>
> >>---
> >>  target-mips/op_helper.c |    1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >>diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
> >>index 5cf1c3f..b828375 100644
> >>--- a/target-mips/op_helper.c
> >>+++ b/target-mips/op_helper.c
> >>@@ -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.

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

> 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.

Patch

diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
index 5cf1c3f..b828375 100644
--- a/target-mips/op_helper.c
+++ b/target-mips/op_helper.c
@@ -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
 }