From 8defdc61042755bc0e34ffdcf02f5c8f47da9cc3 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 11 Sep 2014 11:02:37 +0000 Subject: [PATCH] Fix some clang analyzer errors --- if-linux.c | 3 +-- script.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/if-linux.c b/if-linux.c index 912eda12..61bfd9b0 100644 --- a/if-linux.c +++ b/if-linux.c @@ -627,7 +627,7 @@ link_neigh(struct dhcpcd_ctx *ctx, __unused struct interface *ifp, #endif static int -link_netlink(struct dhcpcd_ctx *ctx, __unused struct interface *_ifp, +link_netlink(struct dhcpcd_ctx *ctx, struct interface *ifp, struct nlmsghdr *nlm) { int r; @@ -635,7 +635,6 @@ link_netlink(struct dhcpcd_ctx *ctx, __unused struct interface *_ifp, struct rtattr *rta, *hwaddr; struct ifinfomsg *ifi; char ifn[IF_NAMESIZE + 1]; - struct interface *ifp; r = link_route(ctx, ifp, nlm); if (r != 0) diff --git a/script.c b/script.c index 7fcf8c54..c931d3ba 100644 --- a/script.c +++ b/script.c @@ -657,7 +657,6 @@ script_runreason(const struct interface *ifp, const char *reason) goto out; } } - ep = env; if (svcname) { e = strlen(SVCNAME) + strlen(svcname) + 2; env[++elen] = malloc(e); -- 2.47.3