From: Randy D. <rd...@xe...> - 2007-07-13 20:55:22
|
Fix printf format warnings: ns-tcpserver.c:194: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ns-tcpserver.c:496: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ns-mcast_receiver.c:417: warning: format '%d' expects type 'int', but argument 3 has type 'ssize_t' ns-igmp_querier.c:440: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t' ns-mcast_join.c:404: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'size_t' --- testcases/network/stress/ns-tools/ns-igmp_querier.c | 2 +- testcases/network/stress/ns-tools/ns-mcast_join.c | 2 +- testcases/network/stress/ns-tools/ns-mcast_receiver.c | 2 +- testcases/network/stress/ns-tools/ns-tcpserver.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) --- ltp-full-20070630.orig/testcases/network/stress/ns-tools/ns-tcpserver.c +++ ltp-full-20070630/testcases/network/stress/ns-tools/ns-tcpserver.c @@ -190,7 +190,7 @@ delete_zombies(struct server_info *info_ if (status != EXIT_SUCCESS) { ++info_p->lost_connection; if (debug) - fprintf (stderr, "The number of lost conncections is %d\n", + fprintf (stderr, "The number of lost conncections is %zu\n", info_p->lost_connection); } } @@ -493,7 +493,7 @@ handle_client(struct server_info *info_p if (info_p->max_connection < info_p->current_connection) { info_p->max_connection = info_p->current_connection; if (debug) - fprintf (stderr, "The maximum connection is updated. The number is %d.\n", info_p->max_connection); + fprintf (stderr, "The maximum connection is updated. The number is %zu.\n", info_p->max_connection); } delete_zombies(info_p); } --- ltp-full-20070630.orig/testcases/network/stress/ns-tools/ns-igmp_querier.c +++ ltp-full-20070630/testcases/network/stress/ns-tools/ns-igmp_querier.c @@ -437,7 +437,7 @@ send_query(struct igmp_info *info_p) start_time = time(NULL); query_size = MY_IGMPV3_QUERY_SIZE(ntohs(info_p->query->nsrcs)); if (debug) - fprintf (stderr, "query size is %u\n", query_size); + fprintf (stderr, "query size is %zu\n", query_size); for(;;) { retval = sendto(sd, info_p->query, query_size, 0, --- ltp-full-20070630.orig/testcases/network/stress/ns-tools/ns-mcast_join.c +++ ltp-full-20070630/testcases/network/stress/ns-tools/ns-mcast_join.c @@ -401,7 +401,7 @@ join_group(void) freeaddrinfo(maddr_info); } - fprintf(stdout, "%u groups\n", num_group); + fprintf(stdout, "%zu groups\n", num_group); fflush(stdout); /* Become a daemon for the next step in shell script */ --- ltp-full-20070630.orig/testcases/network/stress/ns-tools/ns-mcast_receiver.c +++ ltp-full-20070630/testcases/network/stress/ns-tools/ns-mcast_receiver.c @@ -414,7 +414,7 @@ receive_mcast(struct mcast_rcv_info *inf if (errno != EAGAIN) fatal_error("recvfrom()"); } else if (debug) - fprintf(stderr, "received %d byte message\n", msglen); + fprintf(stderr, "received %zd byte message\n", msglen); if (info_p->timeout) if (info_p->timeout < difftime(time(NULL), start_time)) |