diff --git a/src/Makefile.am b/src/Makefile.am index e74d395..dfdcac7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +AM_CFLAGS = -Wall -Wextra + prog = if IPV4 diff --git a/src/fping.c b/src/fping.c index f3bd465..dd91db6 100644 --- a/src/fping.c +++ b/src/fping.c @@ -331,7 +331,7 @@ void print_per_system_splits( void ); void print_global_stats( void ); void main_loop(); void finish(); -int handle_random_icmp( FPING_ICMPHDR *p, int psize, struct sockaddr *addr, socklen_t addr_len); +int handle_random_icmp( FPING_ICMPHDR *p, struct sockaddr *addr, socklen_t addr_len); char *sprint_tm( int t ); void ev_enqueue(HOST_ENTRY *h); HOST_ENTRY *ev_dequeue(); @@ -1525,7 +1525,7 @@ int wait_for_reply(long wait_time) #endif { /* handle some problem */ - if( handle_random_icmp( icp, result, (struct sockaddr *)&response_addr, response_addr_len ) ) + if( handle_random_icmp( icp, (struct sockaddr *)&response_addr, response_addr_len ) ) num_othericmprcvd++; return 1; }/* IF */ @@ -1691,7 +1691,7 @@ int wait_for_reply(long wait_time) ************************************************************/ -int handle_random_icmp(FPING_ICMPHDR *p, int psize, struct sockaddr *addr, socklen_t addr_len) +int handle_random_icmp(FPING_ICMPHDR *p, struct sockaddr *addr, socklen_t addr_len) { FPING_ICMPHDR *sent_icmp; unsigned char *c; @@ -1743,7 +1743,7 @@ int handle_random_icmp(FPING_ICMPHDR *p, int psize, struct sockaddr *addr, sockl print_warning("%s from %s for ICMP Echo sent to %s", icmp_code, addr_ascii, h->host); } - if( inet_addr( h->host ) == -1 ) + if( inet_addr( h->host ) == INADDR_NONE ) print_warning(" (%s)", addr_ascii); print_warning("\n" ); @@ -1771,7 +1771,7 @@ int handle_random_icmp(FPING_ICMPHDR *p, int psize, struct sockaddr *addr, sockl icmp_type, addr_ascii, h->host ); } - if( inet_addr( h->host ) == -1 ) + if( inet_addr( h->host ) == INADDR_NONE ) fprintf( stderr, " (%s)", addr_ascii ); fprintf( stderr, "\n" ); diff --git a/src/seqmap.c b/src/seqmap.c index e64cbd2..20f9825 100644 --- a/src/seqmap.c +++ b/src/seqmap.c @@ -53,15 +53,12 @@ static SEQMAP_VALUE *seqmap_map = NULL; static unsigned int seqmap_next_id = 0; -static SEQMAP_VALUE *seqmap_free_list; #define SEQMAP_TIMEOUT_IN_S 10 #define SEQMAP_UNASSIGNED_HOST_NR UINT_MAX void seqmap_init() { - unsigned int i; - seqmap_map = calloc(SEQMAP_MAXSEQ, sizeof(SEQMAP_VALUE)); if(seqmap_map == NULL) { perror("malloc error (can't allocate seqmap_map)"); diff --git a/src/socket6.c b/src/socket6.c index c2147ed..08e0afc 100644 --- a/src/socket6.c +++ b/src/socket6.c @@ -48,7 +48,6 @@ size_t ping_pkt_size; int open_ping_socket_ipv6(size_t ping_data_size) { struct protoent *proto; - int opton = 1; int s; /* confirm that ICMP is available on this machine */