* [Qemu-trivial] [PATCH] slirp: Remove unused zero_ethaddr[] variable
@ 2014-05-29 11:00 Peter Maydell
2014-05-29 12:52 ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2014-05-29 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Jan Kiszka, patches
The zero_ethaddr[] array is never used; delete it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
clang 3.4 warns about unused const variables like this and
also about unused functions; we have over 400 such warnings
currently, of which some are simple "forgot to clean up
redundant code" like this one, some are deliberate in some
sense (usually the function/var is used in one config but not
another), and some are outright bugs. Anybody feel like wading
through them? :-)
slirp/slirp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 3fb48a4..b7f3726 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -37,8 +37,6 @@ static const uint8_t special_ethaddr[ETH_ALEN] = {
0x52, 0x55, 0x00, 0x00, 0x00, 0x00
};
-static const uint8_t zero_ethaddr[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
-
u_int curtime;
static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances =
--
1.9.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] slirp: Remove unused zero_ethaddr[] variable
2014-05-29 11:00 [Qemu-trivial] [PATCH] slirp: Remove unused zero_ethaddr[] variable Peter Maydell
@ 2014-05-29 12:52 ` Stefan Weil
2014-05-29 13:01 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2014-05-29 12:52 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: qemu-trivial, Jan Kiszka, patches
Am 29.05.2014 13:00, schrieb Peter Maydell:
> The zero_ethaddr[] array is never used; delete it.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> clang 3.4 warns about unused const variables like this and
> also about unused functions; we have over 400 such warnings
> currently, of which some are simple "forgot to clean up
> redundant code" like this one, some are deliberate in some
> sense (usually the function/var is used in one config but not
> another), and some are outright bugs. Anybody feel like wading
> through them? :-)
I can add some more:
* Missing 'static' attributes for local variables and functions
* Use of 0 instead of NULL for pointers (do we want to fix those?)
>
> slirp/slirp.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/slirp/slirp.c b/slirp/slirp.c
> index 3fb48a4..b7f3726 100644
> --- a/slirp/slirp.c
> +++ b/slirp/slirp.c
> @@ -37,8 +37,6 @@ static const uint8_t special_ethaddr[ETH_ALEN] = {
> 0x52, 0x55, 0x00, 0x00, 0x00, 0x00
> };
>
> -static const uint8_t zero_ethaddr[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
> -
> u_int curtime;
>
> static QTAILQ_HEAD(slirp_instances, Slirp) slirp_instances =
>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] slirp: Remove unused zero_ethaddr[] variable
2014-05-29 12:52 ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
@ 2014-05-29 13:01 ` Peter Maydell
0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-05-29 13:01 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Trivial, Jan Kiszka, QEMU Developers, Patch Tracking
On 29 May 2014 13:52, Stefan Weil <sw@weilnetz.de> wrote:
> I can add some more:
>
> * Missing 'static' attributes for local variables and functions
Those seem worth fixing.
> * Use of 0 instead of NULL for pointers (do we want to fix those?)
I wouldn't bother personally.
There's also still a tail of coverity issues.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-29 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29 11:00 [Qemu-trivial] [PATCH] slirp: Remove unused zero_ethaddr[] variable Peter Maydell
2014-05-29 12:52 ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
2014-05-29 13:01 ` Peter Maydell
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.