Silence the last few new warnings.

This commit is contained in:
Nicholas J. Kain 2014-03-10 23:00:57 -04:00
parent 84b36f0e02
commit c0fc3ed430
2 changed files with 7 additions and 6 deletions

View File

@ -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);

View File

@ -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)
{