From: Roy Marples Date: Fri, 8 Apr 2016 20:50:58 +0000 (+0000) Subject: Fix compile warnings. X-Git-Tag: v6.10.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3b1468fac45033777ff8e10c3f787aeb09e026b;p=thirdparty%2Fdhcpcd.git Fix compile warnings. --- diff --git a/ipv4ll.c b/ipv4ll.c index caee1ecb..7be32d64 100644 --- a/ipv4ll.c +++ b/ipv4ll.c @@ -445,12 +445,12 @@ ipv4ll_freedrop(struct interface *ifp, int drop) } } -int -ipv4ll_handlert(struct dhcpcd_ctx *ctx, __unused int cmd, const struct rt *rt) -{ /* This may cause issues in BSD systems, where running as a single dhcpcd * daemon would solve this issue easily. */ #ifdef HAVE_ROUTE_METRIC +int +ipv4ll_handlert(struct dhcpcd_ctx *ctx, __unused int cmd, const struct rt *rt) +{ struct interface *ifp; /* Only interested in default route changes. */ @@ -466,7 +466,7 @@ ipv4ll_handlert(struct dhcpcd_ctx *ctx, __unused int cmd, const struct rt *rt) if_initrt(ifp); ipv4_buildroutes(ctx); } -#endif return 0; } +#endif diff --git a/ipv4ll.h b/ipv4ll.h index 37093f38..8350f534 100644 --- a/ipv4ll.h +++ b/ipv4ll.h @@ -65,7 +65,11 @@ ssize_t ipv4ll_env(char **, const char *, const struct interface *); void ipv4ll_start(void *); void ipv4ll_claimed(void *); void ipv4ll_handle_failure(void *); +#ifdef HAVE_ROUTE_METRIC int ipv4ll_handlert(struct dhcpcd_ctx *, int, const struct rt *); +#else +#define ipv4ll_handlert(a, b, c) (0) +#endif #define ipv4ll_free(ifp) ipv4ll_freedrop((ifp), 0); #define ipv4ll_drop(ifp) ipv4ll_freedrop((ifp), 1);