From: Roy Marples Date: Thu, 11 Sep 2014 11:02:37 +0000 (+0000) Subject: Fix some clang analyzer errors X-Git-Tag: v6.4.4~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8defdc61042755bc0e34ffdcf02f5c8f47da9cc3;p=thirdparty%2Fdhcpcd.git Fix some clang analyzer errors --- 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);