diff mbox

[1/3] lsi: Fix unused-but-set-variable warning

Message ID 1306932992-30075-2-git-send-email-cfergeau@redhat.com
State New
Headers show

Commit Message

Christophe Fergeau June 1, 2011, 12:56 p.m. UTC
This warning is new in gcc 4.6.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
---
 hw/lsi53c895a.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Paolo Bonzini June 1, 2011, 2:19 p.m. UTC | #1
On 06/01/2011 02:56 PM, Christophe Fergeau wrote:
> This warning is new in gcc 4.6.
>
> Signed-off-by: Christophe Fergeau<cfergeau@redhat.com>
> ---
>   hw/lsi53c895a.c |    2 --
>   1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
> index 83084b6..90c6cbc 100644
> --- a/hw/lsi53c895a.c
> +++ b/hw/lsi53c895a.c
> @@ -889,7 +889,6 @@ static void lsi_do_msgout(LSIState *s)
>       uint8_t msg;
>       int len;
>       uint32_t current_tag;
> -    SCSIDevice *current_dev;
>       lsi_request *current_req, *p, *p_next;
>       int id;
>
> @@ -901,7 +900,6 @@ static void lsi_do_msgout(LSIState *s)
>           current_req = lsi_find_by_tag(s, current_tag);
>       }
>       id = (current_tag>>  8)&  0xf;
> -    current_dev = s->bus.devs[id];
>
>       DPRINTF("MSG out len=%d\n", s->dbc);
>       while (s->dbc) {

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Peter Maydell June 10, 2011, 4:36 p.m. UTC | #2
Stefan, if you're picking up gcc warning fixes for the trivial
tree, how about this one?

(I think the other gcc warning fixes are either:
 * in the most recent usb pull request
 * linux-user
 * target-alpha
which all have a clear owner/interested person.)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

On 1 June 2011 15:19, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 06/01/2011 02:56 PM, Christophe Fergeau wrote:
>>
>> This warning is new in gcc 4.6.
>>
>> Signed-off-by: Christophe Fergeau<cfergeau@redhat.com>
>> ---
>>  hw/lsi53c895a.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
>> index 83084b6..90c6cbc 100644
>> --- a/hw/lsi53c895a.c
>> +++ b/hw/lsi53c895a.c
>> @@ -889,7 +889,6 @@ static void lsi_do_msgout(LSIState *s)
>>      uint8_t msg;
>>      int len;
>>      uint32_t current_tag;
>> -    SCSIDevice *current_dev;
>>      lsi_request *current_req, *p, *p_next;
>>      int id;
>>
>> @@ -901,7 +900,6 @@ static void lsi_do_msgout(LSIState *s)
>>          current_req = lsi_find_by_tag(s, current_tag);
>>      }
>>      id = (current_tag>>  8)&  0xf;
>> -    current_dev = s->bus.devs[id];
>>
>>      DPRINTF("MSG out len=%d\n", s->dbc);
>>      while (s->dbc) {
>
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Stefan Hajnoczi June 10, 2011, 6:45 p.m. UTC | #3
On Wed, Jun 01, 2011 at 02:56:30PM +0200, Christophe Fergeau wrote:
> This warning is new in gcc 4.6.
> 
> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
> ---
>  hw/lsi53c895a.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan
Richard Henderson June 10, 2011, 7:21 p.m. UTC | #4
On 06/10/2011 09:36 AM, Peter Maydell wrote:
> Stefan, if you're picking up gcc warning fixes for the trivial
> tree, how about this one?
> 
> (I think the other gcc warning fixes are either:
>  * in the most recent usb pull request
>  * linux-user
>  * target-alpha

Speaking of, anyone willing to pull and/or look at my target-alpha patchset?
I've been re-posting and/or pinging it for more than 2 months now with no
more than one spelling error as feedback...


r~
diff mbox

Patch

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 83084b6..90c6cbc 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -889,7 +889,6 @@  static void lsi_do_msgout(LSIState *s)
     uint8_t msg;
     int len;
     uint32_t current_tag;
-    SCSIDevice *current_dev;
     lsi_request *current_req, *p, *p_next;
     int id;
 
@@ -901,7 +900,6 @@  static void lsi_do_msgout(LSIState *s)
         current_req = lsi_find_by_tag(s, current_tag);
     }
     id = (current_tag >> 8) & 0xf;
-    current_dev = s->bus.devs[id];
 
     DPRINTF("MSG out len=%d\n", s->dbc);
     while (s->dbc) {