From rdunlap@xenotime.net Fri Jul 13 16:59:16 2007 Delivered-To: vapierfilter@gmail.com Received: by 10.114.59.18 with SMTP id h18cs257122waa; Fri, 13 Jul 2007 13:55:32 -0700 (PDT) Received: by 10.65.251.17 with SMTP id d17mr3739065qbs.1184360131897; Fri, 13 Jul 2007 13:55:31 -0700 (PDT) Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by mx.google.com with ESMTP id e10si7683747qbe.2007.07.13.13.55.31; Fri, 13 Jul 2007 13:55:31 -0700 (PDT) Received-SPF: neutral (google.com: 140.211.166.183 is neither permitted nor denied by domain of ltp-list-bounces@lists.sourceforge.net) Received: by smtp.gentoo.org (Postfix) id BDFED64FA3; Fri, 13 Jul 2007 20:55:30 +0000 (UTC) Delivered-To: vapier@gentoo.org Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 8F4B364E53 for ; Fri, 13 Jul 2007 20:55:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -2.409 X-Spam-Level: X-Spam-Status: No, score=-2.409 required=5.5 tests=[AWL=0.055, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D8grg5fy0MsY for ; Fri, 13 Jul 2007 20:55:25 +0000 (UTC) Received: from lists-outbound.sourceforge.net (lists-outbound.sourceforge.net [66.35.250.225]) by smtp.gentoo.org (Postfix) with ESMTP id BCA3B64FA3 for ; Fri, 13 Jul 2007 20:55:25 +0000 (UTC) Received: from sc8-sf-list1-new.sourceforge.net (sc8-sf-list1-new-b.sourceforge.net [10.3.1.93]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 85D7C130C5; Fri, 13 Jul 2007 13:55:25 -0700 (PDT) Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1I9SAa-0000tB-V2 for ltp-list@lists.sourceforge.net; Fri, 13 Jul 2007 13:55:22 -0700 Received: from xenotime.net ([66.160.160.81]) by mail.sourceforge.net with smtp (Exim 4.44) id 1I9SAa-0005N5-Mv for ltp-list@lists.sourceforge.net; Fri, 13 Jul 2007 13:55:20 -0700 Received: from midway.site ([71.117.236.25]) by xenotime.net for ; Fri, 13 Jul 2007 13:55:16 -0700 Date: Fri, 13 Jul 2007 13:59:16 -0700 From: Randy Dunlap To: ltp-list@lists.sourceforge.net Message-Id: <20070713135916.ded7073e.rdunlap@xenotime.net> Organization: YPO4 X-Mailer: Sylpheed 2.4.2 (GTK+ 2.8.10; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Subject: [LTP] [patch] fix net-stress printf format warnings X-BeenThere: ltp-list@lists.sourceforge.net X-Mailman-Version: 2.1.8 Precedence: list List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ltp-list-bounces@lists.sourceforge.net Errors-To: ltp-list-bounces@lists.sourceforge.net Status: R X-Status: NC X-KMail-EncryptionState: X-KMail-SignatureState: X-KMail-MDN-Sent: 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)) ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list