All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-trivial@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] darwin-user: Remove two unused variables
Date: Fri, 22 Jul 2011 23:43:08 +0200	[thread overview]
Message-ID: <4E29EEEC.3090803@mail.berlios.de> (raw)
In-Reply-To: <1A5A263C-4EFA-4BF5-AC6E-937D109C8DA7@web.de>

Am 22.07.2011 22:48, schrieb Andreas Färber:
> Hi Stefan W.,
>
> Am 20.07.2011 um 21:40 schrieb Stefan Weil:
>
>> cppcheck report:
>>
>> darwin-user/signal.c:322: style: Unused variable: i
>> darwin-user/signal.c:322: style:
>> Variable 'err' is assigned a value that is never used
>
> Does this really bug you? I'm a bit skeptical towards trying to fix 
> warnings in code that doesn't compile either way... (or does it by now?)
>
> Andreas

Hi Andreas,

the warnings were the result of a static code inspection with
a program called cppcheck. I don't compile darwin code,
so I did not notice that the code does not compile.

Is there a good reason to keep those two unused variables?
Fixing the issue helps with static code analysis because
unnecessary manual code checks can be avoided.

Cheers,
Stefan



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <weil@mail.berlios.de>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-trivial@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] darwin-user: Remove two unused variables
Date: Fri, 22 Jul 2011 23:43:08 +0200	[thread overview]
Message-ID: <4E29EEEC.3090803@mail.berlios.de> (raw)
In-Reply-To: <1A5A263C-4EFA-4BF5-AC6E-937D109C8DA7@web.de>

Am 22.07.2011 22:48, schrieb Andreas Färber:
> Hi Stefan W.,
>
> Am 20.07.2011 um 21:40 schrieb Stefan Weil:
>
>> cppcheck report:
>>
>> darwin-user/signal.c:322: style: Unused variable: i
>> darwin-user/signal.c:322: style:
>> Variable 'err' is assigned a value that is never used
>
> Does this really bug you? I'm a bit skeptical towards trying to fix 
> warnings in code that doesn't compile either way... (or does it by now?)
>
> Andreas

Hi Andreas,

the warnings were the result of a static code inspection with
a program called cppcheck. I don't compile darwin code,
so I did not notice that the code does not compile.

Is there a good reason to keep those two unused variables?
Fixing the issue helps with static code analysis because
unnecessary manual code checks can be avoided.

Cheers,
Stefan

  reply	other threads:[~2011-07-22 21:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 19:40 [Qemu-trivial] [PATCH] darwin-user: Remove two unused variables Stefan Weil
2011-07-20 19:40 ` [Qemu-devel] " Stefan Weil
2011-07-22 20:48 ` [Qemu-trivial] " Andreas Färber
2011-07-22 20:48   ` Andreas Färber
2011-07-22 21:43   ` Stefan Weil [this message]
2011-07-22 21:43     ` Stefan Weil
2011-08-07  9:39     ` [Qemu-trivial] " Blue Swirl
2011-08-07  9:39       ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E29EEEC.3090803@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=andreas.faerber@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.