* [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch
@ 2015-04-21 16:06 Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-21 16:06 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_simple.c b/tc/m_simple.c
index 866552f559b3..3b6d7beb769c 100644
--- a/tc/m_simple.c
+++ b/tc/m_simple.c
@@ -139,7 +139,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",
- strlen(simpdata), simpdata);
+ (long)strlen(simpdata), simpdata);
return -1;
}
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH iproute2 2/3] libnamespaces: fix warning about syscall()
2015-04-21 16:06 [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch Nicolas Dichtel
@ 2015-04-21 16:06 ` Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
2015-04-21 16:22 ` [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch David Laight
2 siblings, 0 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-21 16:06 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
The warning was:
In file included from namespace.c:14:0:
../include/namespace.h: In function ‘setns’:
../include/namespace.h:37:2: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration]
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
include/namespace.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/namespace.h b/include/namespace.h
index a2ac7dccd0e1..5add9d266b7d 100644
--- a/include/namespace.h
+++ b/include/namespace.h
@@ -3,6 +3,7 @@
#include <sched.h>
#include <sys/mount.h>
+#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI
2015-04-21 16:06 [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
@ 2015-04-21 16:06 ` Nicolas Dichtel
2015-04-21 16:22 ` [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch David Laight
2 siblings, 0 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-21 16:06 UTC (permalink / raw)
To: shemminger; +Cc: netdev, Nicolas Dichtel
This flag is only for the netlink protocol (multi-part messages), no reason
to reject messages without it.
Note that this flag was removed by the following kernel patches (v3.14)
65886f439ab0 ipmr: fix mfc notification flags
f518338b1603 ip6mr: fix mfc notification flags
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ipmroute.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index 13ac892512d0..125a13f8c582 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -67,8 +67,7 @@ int print_mroute(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
int family;
if ((n->nlmsg_type != RTM_NEWROUTE &&
- n->nlmsg_type != RTM_DELROUTE) ||
- !(n->nlmsg_flags & NLM_F_MULTI)) {
+ n->nlmsg_type != RTM_DELROUTE)) {
fprintf(stderr, "Not a multicast route: %08x %08x %08x\n",
n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
return 0;
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch
2015-04-21 16:06 [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
@ 2015-04-21 16:22 ` David Laight
2015-04-22 8:27 ` [PATCH v2 " Nicolas Dichtel
2 siblings, 1 reply; 7+ messages in thread
From: David Laight @ 2015-04-21 16:22 UTC (permalink / raw)
To: 'Nicolas Dichtel', shemminger; +Cc: netdev
From: Nicolas Dichtel
> Sent: 21 April 2015 17:07
> 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 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_simple.c b/tc/m_simple.c
> index 866552f559b3..3b6d7beb769c 100644
> --- a/tc/m_simple.c
> +++ b/tc/m_simple.c
> @@ -139,7 +139,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",
> - strlen(simpdata), simpdata);
> + (long)strlen(simpdata), simpdata);
> return -1;
Isn't the correct fix to use "%zu" ?
David
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 iproute2 1/3] tc: fix compilation warning on 32bits arch
2015-04-21 16:22 ` [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch David Laight
@ 2015-04-22 8:27 ` Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
0 siblings, 2 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-22 8:27 UTC (permalink / raw)
To: shemminger, david.laight; +Cc: netdev, Nicolas Dichtel
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>
---
v2: use %zu instead of casting to a long
tc/m_simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_simple.c b/tc/m_simple.c
index 866552f559b3..1ad55268729c 100644
--- a/tc/m_simple.c
+++ b/tc/m_simple.c
@@ -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;
}
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 iproute2 2/3] libnamespaces: fix warning about syscall()
2015-04-22 8:27 ` [PATCH v2 " Nicolas Dichtel
@ 2015-04-22 8:27 ` Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-22 8:27 UTC (permalink / raw)
To: shemminger, david.laight; +Cc: netdev, Nicolas Dichtel
The warning was:
In file included from namespace.c:14:0:
../include/namespace.h: In function ‘setns’:
../include/namespace.h:37:2: warning: implicit declaration of function ‘syscall’ [-Wimplicit-function-declaration]
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
include/namespace.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/namespace.h b/include/namespace.h
index a2ac7dccd0e1..5add9d266b7d 100644
--- a/include/namespace.h
+++ b/include/namespace.h
@@ -3,6 +3,7 @@
#include <sched.h>
#include <sys/mount.h>
+#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI
2015-04-22 8:27 ` [PATCH v2 " Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
@ 2015-04-22 8:27 ` Nicolas Dichtel
1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Dichtel @ 2015-04-22 8:27 UTC (permalink / raw)
To: shemminger, david.laight; +Cc: netdev, Nicolas Dichtel
This flag is only for the netlink protocol (multi-part messages), no reason
to reject messages without it.
Note that this flag was removed by the following kernel patches (v3.14)
65886f439ab0 ipmr: fix mfc notification flags
f518338b1603 ip6mr: fix mfc notification flags
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
ip/ipmroute.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ip/ipmroute.c b/ip/ipmroute.c
index 13ac892512d0..125a13f8c582 100644
--- a/ip/ipmroute.c
+++ b/ip/ipmroute.c
@@ -67,8 +67,7 @@ int print_mroute(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
int family;
if ((n->nlmsg_type != RTM_NEWROUTE &&
- n->nlmsg_type != RTM_DELROUTE) ||
- !(n->nlmsg_flags & NLM_F_MULTI)) {
+ n->nlmsg_type != RTM_DELROUTE)) {
fprintf(stderr, "Not a multicast route: %08x %08x %08x\n",
n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
return 0;
--
2.2.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-22 8:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 16:06 [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
2015-04-21 16:06 ` [PATCH iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
2015-04-21 16:22 ` [PATCH iproute2 1/3] tc: fix compilation warning on 32bits arch David Laight
2015-04-22 8:27 ` [PATCH v2 " Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 2/3] libnamespaces: fix warning about syscall() Nicolas Dichtel
2015-04-22 8:27 ` [PATCH v2 iproute2 3/3] mroute: remove invalid check against NLM_F_MULTI Nicolas Dichtel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.