From c0fc3ed430fad8fb7d6a84cd98dc76188e0b6d30 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Mon, 10 Mar 2014 23:00:57 -0400 Subject: [PATCH] Silence the last few new warnings. --- ndhc/dhcp.c | 5 +++-- ndhc/ndhc.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ndhc/dhcp.c b/ndhc/dhcp.c index b341529..096537d 100644 --- a/ndhc/dhcp.c +++ b/ndhc/dhcp.c @@ -110,7 +110,7 @@ static int create_udp_socket(uint32_t ip, uint16_t port, char *iface) // Returns fd of new listen socket bound to 0.0.0.0:@68 on interface @inf // on success, or -1 on failure. -static int create_udp_listen_socket(struct client_state_t *cs, char *inf) +static int create_udp_listen_socket(char *inf) { int fd = create_udp_socket(INADDR_ANY, DHCP_CLIENT_PORT, inf); if (fd == -1) @@ -443,6 +443,7 @@ static int send_dhcp_raw(struct dhcpmsg *payload) .source = htons(DHCP_CLIENT_PORT), .dest = htons(DHCP_SERVER_PORT), .len = htons(ud_len), + .check = 0, }, .data = *payload, }; @@ -472,7 +473,7 @@ static void change_listen_mode(struct client_state_t *cs, int new_mode) return; cs->listenFd = new_mode == LM_RAW ? create_raw_listen_socket(cs, client_config.ifindex) : - create_udp_listen_socket(cs, client_config.interface); + create_udp_listen_socket(client_config.interface); if (cs->listenFd < 0) { log_error("FATAL: Couldn't listen on socket: %s.", strerror(errno)); exit(EXIT_FAILURE); diff --git a/ndhc/ndhc.c b/ndhc/ndhc.c index 921001f..7a8570a 100644 --- a/ndhc/ndhc.c +++ b/ndhc/ndhc.c @@ -123,7 +123,7 @@ static void show_usage(void) exit(EXIT_SUCCESS); } -static void signal_dispatch() +static void signal_dispatch(void) { int t; size_t off = 0; @@ -259,7 +259,7 @@ int pToNdhcW; int pToIfchR; int pToIfchW; -static void create_ipc_pipes() { +static void create_ipc_pipes(void) { int niPipe[2]; int inPipe[2]; @@ -279,7 +279,7 @@ static void create_ipc_pipes() { pToIfchW = inPipe[1]; } -void ndhc_main() { +static void ndhc_main(void) { prctl(PR_SET_NAME, "ndhc: master"); log_line("ndhc client " NDHC_VERSION " started on interface [%s].", client_config.interface); @@ -321,7 +321,7 @@ extern int allow_hostname; extern char pidfile_ifch[MAX_PATH_LENGTH]; extern uid_t ifch_uid; extern gid_t ifch_gid; -extern void ifch_main(); +extern void ifch_main(void); int main(int argc, char **argv) {