public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, daniel@iogearbox.net,
	Jamal Hadi Salim <jhs@mojatatu.com>
Subject: [iproute2 PATCH v2 1/1] tc simple action: bug fix
Date: Tue, 24 May 2016 07:52:48 -0400	[thread overview]
Message-ID: <1464090769-29763-1-git-send-email-jhs@emojatatu.com> (raw)

From: Jamal Hadi Salim <jhs@mojatatu.com>

Failed compile
m_simple.c: In function ‘parse_simple’:
m_simple.c:154:6: warning: too many arguments for format [-Wformat-extra-args]
      *argv);
      ^
m_simple.c:103:14: warning: unused variable ‘maybe_bind’ [-Wunused-variable]

Reported-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 tc/m_simple.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tc/m_simple.c b/tc/m_simple.c
index feba61b..27b3e5e 100644
--- a/tc/m_simple.c
+++ b/tc/m_simple.c
@@ -100,7 +100,7 @@ parse_simple(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
 	struct tc_defact sel = {};
 	int argc = *argc_p;
 	char **argv = *argv_p;
-	int ok = 0, maybe_bind = 0;
+	int ok = 0;
 	struct rtattr *tail;
 	char *simpdata = NULL;
 
@@ -150,7 +150,7 @@ parse_simple(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
 		if (matches(*argv, "index") == 0) {
 			NEXT_ARG();
 			if (get_u32(&sel.index, *argv, 10)) {
-				fprintf(stderr, "simple: Illegal \"index\"\n",
+				fprintf(stderr, "simple: Illegal \"index\" (%s)\n",
 					*argv);
 				return -1;
 			}
@@ -171,7 +171,6 @@ parse_simple(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
 		return -1;
 	}
 
-
 	sel.action = TC_ACT_PIPE;
 
 	tail = NLMSG_TAIL(n);
-- 
1.9.1

             reply	other threads:[~2016-05-24 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 11:52 Jamal Hadi Salim [this message]
2016-05-24 11:52 ` [iproute2 PATCH v2 1/1] vv4.6.0 Jamal Hadi Salim
2016-05-24 12:16   ` Jamal Hadi Salim

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=1464090769-29763-1-git-send-email-jhs@emojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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