public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <mareklindner@neomailbox.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH 2/2] batctl: tcpdump - use proper format string when printing help message
Date: Mon, 02 May 2016 22:04:13 +0800	[thread overview]
Message-ID: <2815997.TuhcixZTPn@voltaire> (raw)
In-Reply-To: <1460626198-31226-2-git-send-email-a@unstable.cc>

[-- Attachment #1: Type: text/plain, Size: 3501 bytes --]

On Thursday, April 14, 2016 17:29:58 Antonio Quartulli wrote:
> +       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);

$ make
    CC tcpdump.o
tcpdump.c: In function ‘tcpdump_usage’:
tcpdump.c:86:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman ogm packets\n", DUMP_TYPE_BATOGM);
                  ^
tcpdump.c:87:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman ogmv2 packets\n", DUMP_TYPE_BATOGM2);
                  ^
tcpdump.c:88:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman elp packets\n", DUMP_TYPE_BATELP);
                  ^
tcpdump.c:89:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman icmp packets\n", DUMP_TYPE_BATICMP);
                  ^
tcpdump.c:90:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman unicast packets\n", DUMP_TYPE_BATUCAST);
                  ^
tcpdump.c:91:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman broadcast packets\n", 
DUMP_TYPE_BATBCAST);
                  ^
tcpdump.c:92:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman fragmented packets\n", 
DUMP_TYPE_BATFRAG);
                  ^
tcpdump.c:93:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman unicast tvlv packets\n", 
DUMP_TYPE_BATUTVLV);
                  ^
tcpdump.c:94:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - non batman packets\n", DUMP_TYPE_NONBAT);
                  ^
tcpdump.c:95:18: warning: format ‘%lu’ expects argument of type ‘long unsigned 
int’, but argument 3 has type ‘int’ [-Wformat=]
  fprintf(stderr, " \t\t%3lu - batman ogm & non batman packets\n", 
DUMP_TYPE_BATOGM | DUMP_TYPE_NONBAT);
                  ^

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-05-02 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  9:29 [B.A.T.M.A.N.] [PATCH 1/2] batctl: tcpdump - filter OGM and OGMv2 packets independently Antonio Quartulli
2016-04-14  9:29 ` [B.A.T.M.A.N.] [PATCH 2/2] batctl: tcpdump - use proper format string when printing help message Antonio Quartulli
2016-05-02 14:04   ` Marek Lindner [this message]
2016-05-02 14:10     ` Antonio Quartulli
2016-05-02 14:39       ` Sven Eckelmann
2016-05-02 13:17 ` [B.A.T.M.A.N.] [PATCH 1/2] batctl: tcpdump - filter OGM and OGMv2 packets independently Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2815997.TuhcixZTPn@voltaire \
    --to=mareklindner@neomailbox.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox