From patchwork Thu Apr 14 09:29:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 15962 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 60F0A824DB; Thu, 14 Apr 2016 11:30:26 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=unstable.cc Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=5.148.176.60; helo=s2.neomailbox.net; envelope-from=a@unstable.cc; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=unstable.cc Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by open-mesh.org (Postfix) with ESMTPS id A456181AB7 for ; Thu, 14 Apr 2016 11:30:16 +0200 (CEST) From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 14 Apr 2016 17:29:58 +0800 Message-Id: <1460626198-31226-2-git-send-email-a@unstable.cc> In-Reply-To: <1460626198-31226-1-git-send-email-a@unstable.cc> References: <1460626198-31226-1-git-send-email-a@unstable.cc> MIME-Version: 1.0 Cc: Antonio Quartulli , Antonio Quartulli Subject: [B.A.T.M.A.N.] [PATCH 2/2] batctl: tcpdump - use proper format string when printing help message X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" this patch fixes warning like this tcpdump.c:86:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] when comiling with gcc-5.3 Signed-off-by: Antonio Quartulli --- tcpdump.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tcpdump.c b/tcpdump.c index 745f5d4..a036b93 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -83,16 +83,16 @@ static void tcpdump_usage(void) fprintf(stderr, " \t -p dump specific packet type\n"); fprintf(stderr, " \t -x dump all packet types except specified\n"); fprintf(stderr, "packet types:\n"); - fprintf(stderr, " \t\t%3d - batman ogm packets\n", DUMP_TYPE_BATOGM); - fprintf(stderr, " \t\t%3d - batman ogmv2 packets\n", DUMP_TYPE_BATOGM2); - fprintf(stderr, " \t\t%3d - batman elp packets\n", DUMP_TYPE_BATELP); - fprintf(stderr, " \t\t%3d - batman icmp packets\n", DUMP_TYPE_BATICMP); - fprintf(stderr, " \t\t%3d - batman unicast packets\n", DUMP_TYPE_BATUCAST); - fprintf(stderr, " \t\t%3d - batman broadcast packets\n", DUMP_TYPE_BATBCAST); - fprintf(stderr, " \t\t%3d - batman fragmented packets\n", DUMP_TYPE_BATFRAG); - fprintf(stderr, " \t\t%3d - batman unicast tvlv packets\n", DUMP_TYPE_BATUTVLV); - fprintf(stderr, " \t\t%3d - non batman packets\n", DUMP_TYPE_NONBAT); - fprintf(stderr, " \t\t%3d - batman ogm & non batman packets\n", DUMP_TYPE_BATOGM | DUMP_TYPE_NONBAT); + fprintf(stderr, " \t\t%3lu - batman ogm packets\n", DUMP_TYPE_BATOGM); + fprintf(stderr, " \t\t%3lu - batman ogmv2 packets\n", DUMP_TYPE_BATOGM2); + fprintf(stderr, " \t\t%3lu - batman elp packets\n", DUMP_TYPE_BATELP); + fprintf(stderr, " \t\t%3lu - batman icmp packets\n", DUMP_TYPE_BATICMP); + fprintf(stderr, " \t\t%3lu - batman unicast packets\n", DUMP_TYPE_BATUCAST); + fprintf(stderr, " \t\t%3lu - batman broadcast packets\n", DUMP_TYPE_BATBCAST); + fprintf(stderr, " \t\t%3lu - batman fragmented packets\n", DUMP_TYPE_BATFRAG); + fprintf(stderr, " \t\t%3lu - batman unicast tvlv packets\n", DUMP_TYPE_BATUTVLV); + fprintf(stderr, " \t\t%3lu - non batman packets\n", DUMP_TYPE_NONBAT); + fprintf(stderr, " \t\t%3lu - batman ogm & non batman packets\n", DUMP_TYPE_BATOGM | DUMP_TYPE_NONBAT); } static int print_time(void)