]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: fix compilation warning on 32bits arch
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 22 Apr 2015 08:27:05 +0000 (10:27 +0200)
committerStephen Hemminger <shemming@brocade.com>
Mon, 27 Apr 2015 18:41:46 +0000 (11:41 -0700)
The warning was:
m_simple.c: In function ‘parse_simple’:
m_simple.c:142:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’ [-Wformat]

Useful to be able to compile with -Werror.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
tc/m_simple.c

index 866552f559b3b69c9f6ffa9ec89ded5487fa437a..1ad55268729cd7983d737d653e50b22bd6fe0888 100644 (file)
@@ -138,7 +138,7 @@ parse_simple(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
        }
 
        if (strlen(simpdata) > (SIMP_MAX_DATA - 1)) {
-               fprintf(stderr, "simple: Illegal string len %ld <%s> \n",
+               fprintf(stderr, "simple: Illegal string len %zu <%s> \n",
                        strlen(simpdata), simpdata);
                return -1;
        }