From: Jan Synacek <jsynacek@redhat.com>
To: yoshfuji@linux-ipv6.org
Cc: netdev@vger.kernel.org, Jan Synacek <jsynacek@redhat.com>
Subject: [PATCH 1/2] ninfod: Fix more unused variables.
Date: Fri, 7 Dec 2012 09:25:23 +0100 [thread overview]
Message-ID: <1354868724-15549-2-git-send-email-jsynacek@redhat.com> (raw)
In-Reply-To: <1354868724-15549-1-git-send-email-jsynacek@redhat.com>
| ni_ifaddrs.c: In function ‘ni_ifaddrs’:
| ni_ifaddrs.c:389:14: warning: variable ‘nlm_scope’ set but not used [-Wunused-but-set-variable]
| ni_ifaddrs.c:353:13: warning: variable ‘ifflist’ set but not used [-Wunused-but-set-variable]
| ni_ifaddrs.c:322:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Jan Synacek <jsynacek@redhat.com>
---
ninfod/ni_ifaddrs.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/ninfod/ni_ifaddrs.c b/ninfod/ni_ifaddrs.c
index 4225a5a..0820497 100644
--- a/ninfod/ni_ifaddrs.c
+++ b/ninfod/ni_ifaddrs.c
@@ -319,7 +319,6 @@ int ni_ifaddrs(struct ni_ifaddrs **ifap, sa_family_t family)
pid_t pid = getpid();
int seq = 0;
- int result;
int build; /* 0 or 1 */
/* ---------------------------------- */
@@ -350,7 +349,6 @@ int ni_ifaddrs(struct ni_ifaddrs **ifap, sa_family_t family)
struct ni_ifaddrs *ifl = NULL, *ifa = NULL;
struct nlmsghdr *nlh, *nlh0;
void *data = NULL, *xdata = NULL;
- uint16_t *ifflist = NULL;
#ifndef IFA_LOCAL
struct rtmaddr_ifamap ifamap;
#endif
@@ -362,18 +360,15 @@ int ni_ifaddrs(struct ni_ifaddrs **ifap, sa_family_t family)
*ifap = ifa;
else {
free_data(data);
- result = 0;
break;
}
if (data == NULL) {
free_data(data);
- result = -1;
break;
}
ifl = NULL;
data += NLMSG_ALIGN(sizeof(struct ni_ifaddrs)) * icnt;
xdata = data + dlen;
- ifflist = xdata + xlen;
}
for (nlm = nlmsg_list; nlm; nlm = nlm->nlm_next) {
@@ -386,7 +381,7 @@ int ni_ifaddrs(struct ni_ifaddrs **ifap, sa_family_t family)
size_t nlm_struct_size = 0;
sa_family_t nlm_family = 0;
- uint32_t nlm_scope = 0, nlm_index = 0;
+ uint32_t nlm_index = 0;
unsigned int nlm_flags;
size_t rtasize;
@@ -405,7 +400,6 @@ int ni_ifaddrs(struct ni_ifaddrs **ifap, sa_family_t family)
ifam = (struct ifaddrmsg *) NLMSG_DATA(nlh);
nlm_struct_size = sizeof(*ifam);
nlm_family = ifam->ifa_family;
- nlm_scope = ifam->ifa_scope;
nlm_index = ifam->ifa_index;
nlm_flags = ifam->ifa_flags;
if (family && nlm_family != family)
--
1.8.0.1
next prev parent reply other threads:[~2012-12-07 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 8:25 [PATCH 0/2] iputils: minor ninfod and ping6 fixes Jan Synacek
2012-12-07 8:25 ` Jan Synacek [this message]
2012-12-07 8:25 ` [PATCH 2/2] ping6: Fix -F switch Jan Synacek
2012-12-10 9:58 ` Jan Synacek
2012-12-10 10:12 ` [PATCH 2/2 fixed] " Jan Synacek
2012-12-19 21:05 ` [PATCH 0/2] iputils: minor ninfod and ping6 fixes YOSHIFUJI Hideaki
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=1354868724-15549-2-git-send-email-jsynacek@redhat.com \
--to=jsynacek@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).