diff --git a/src/dhcp-common.c b/src/dhcp-common.c index 7b37daf..7618452 100644 --- a/src/dhcp-common.c +++ b/src/dhcp-common.c @@ -627,6 +627,8 @@ int lookup_dhcp_opt(int prot, char *name) const struct opttab_t *t; int i; + (void)prot; + #ifdef HAVE_DHCP6 if (prot == AF_INET6) t = opttab6; @@ -646,6 +648,8 @@ int lookup_dhcp_len(int prot, int val) const struct opttab_t *t; int i; + (void)prot; + #ifdef HAVE_DHCP6 if (prot == AF_INET6) t = opttab6; diff --git a/src/dhcp6.c b/src/dhcp6.c index 146e693..cc95937 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -552,6 +552,7 @@ static int make_duid1(int index, unsigned int type, char *mac, size_t maclen, vo unsigned char *p; (void)index; + (void)parm; if (type >= 256) return 1; diff --git a/src/dnsmasq.c b/src/dnsmasq.c index 8dcb1d4..f1c9500 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -51,8 +51,10 @@ int main (int argc, char **argv) cap_user_header_t hdr = NULL; cap_user_data_t data = NULL; #endif +#if defined(HAVE_DHCP) || defined(HAVE_DHCP6) struct dhcp_context *context; struct dhcp_relay *relay; +#endif #ifdef LOCALEDIR setlocale(LC_ALL, ""); @@ -1231,6 +1233,8 @@ void poll_resolv(int force, int do_reload, time_t now) void clear_cache_and_reload(time_t now) { + (void)now; + if (daemon->port != 0) cache_reload(); diff --git a/src/lease.c b/src/lease.c index 02ca094..4b4d10a 100644 --- a/src/lease.c +++ b/src/lease.c @@ -788,6 +788,7 @@ void lease_set_hwaddr(struct dhcp_lease *lease, unsigned char *hwaddr, #endif (void)force; + (void)now; if (hw_len != lease->hwaddr_len || hw_type != lease->hwaddr_type || @@ -956,6 +957,8 @@ void lease_set_hostname(struct dhcp_lease *lease, char *name, int auth, char *do void lease_set_interface(struct dhcp_lease *lease, int interface, time_t now) { + (void)now; + if (lease->last_interface == interface) return; @@ -984,6 +987,8 @@ int do_script_run(time_t now) { struct dhcp_lease *lease; + (void)now; + #ifdef HAVE_DBUS /* If we're going to be sending DBus signals, but the connection is not yet up, delay everything until it is. */ diff --git a/src/netlink.c b/src/netlink.c index 2bcaf01..d093988 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -402,6 +402,8 @@ static int nl_async(struct nlmsghdr *h) static void nl_newaddress(time_t now) { + (void)now; + if (option_bool(OPT_CLEVERBIND) || daemon->doing_dhcp6 || daemon->relay6 || daemon->doing_ra) enumerate_interfaces(0); diff --git a/src/network.c b/src/network.c index 576a7cf..fc0346e 100644 --- a/src/network.c +++ b/src/network.c @@ -709,6 +709,8 @@ static struct listener *create_listeners(union mysockaddr *addr, int do_tftp, in struct listener *l = NULL; int fd = -1, tcpfd = -1, tftpfd = -1; + (void)do_tftp; + if (daemon->port != 0) { fd = make_sock(addr, SOCK_DGRAM, dienow); diff --git a/src/rfc3315.c b/src/rfc3315.c index adca102..9618ffc 100644 --- a/src/rfc3315.c +++ b/src/rfc3315.c @@ -1711,7 +1711,11 @@ static void calculate_times(struct dhcp_context *context, unsigned int *min_time static void update_leases(struct state *state, struct dhcp_context *context, struct in6_addr *addr, unsigned int lease_time, time_t now) { struct dhcp_lease *lease = lease6_find_by_addr(addr, 128, 0); +#ifdef HAVE_SCRIPT struct dhcp_netid *tagif = run_tag_if(state->tags); +#endif + + (void)context; if (!lease) lease = lease6_allocate(addr, state->ia_type == OPTION6_IA_NA ? LEASE_NA : LEASE_TA);