diff mbox

[iproute2,1/1] tc simple action: bug fix

Message ID 1464051893-25680-1-git-send-email-jhs@emojatatu.com
State Superseded, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Jamal Hadi Salim May 24, 2016, 1:04 a.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Borkmann May 24, 2016, 10:30 a.m. UTC | #1
On 05/24/2016 03:04 AM, Jamal Hadi Salim wrote:
> 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]

Btw, that last one is still not addressed.
Jamal Hadi Salim May 24, 2016, 11:43 a.m. UTC | #2
On 16-05-24 06:30 AM, Daniel Borkmann wrote:
> On 05/24/2016 03:04 AM, Jamal Hadi Salim wrote:
>> 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]
>
> Btw, that last one is still not addressed.

Sigh. It is fixed in my tree. I have a few of patches that
I was planning to send later and some are touching intersecting files
and i am trying to be clever with git. Any tips? ;->
Will send v2.

cheers,
jamal
diff mbox

Patch

diff --git a/tc/m_simple.c b/tc/m_simple.c
index 11d4869..8b3d655 100644
--- a/tc/m_simple.c
+++ b/tc/m_simple.c
@@ -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;
 			}