All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings
@ 2019-11-21 12:33 Michal Rostecki
  2019-11-21 13:35 ` Phil Sutter
  2019-11-21 13:40 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Rostecki @ 2019-11-21 12:33 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Michal Rostecki

This change fixes the following warnings:

mnl.c: In function ‘mnl_nft_flowtable_add’:
mnl.c:1442:14: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration]
  dev_array = calloc(len, sizeof(char *));
              ^~~~~~
mnl.c:1442:14: warning: incompatible implicit declaration of built-in function ‘calloc’
mnl.c:1442:14: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
mnl.c:1449:2: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
  free(dev_array);
  ^~~~
mnl.c:1449:2: warning: incompatible implicit declaration of built-in function ‘free’
mnl.c:1449:2: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
---
 src/mnl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mnl.c b/src/mnl.c
index fdba0af8..aa5b0b46 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -30,6 +30,7 @@
 #include <arpa/inet.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <stdlib.h>
 #include <utils.h>
 #include <nftables.h>
 
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings
  2019-11-21 12:33 [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings Michal Rostecki
@ 2019-11-21 13:35 ` Phil Sutter
  2019-11-21 13:40 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2019-11-21 13:35 UTC (permalink / raw)
  To: Michal Rostecki; +Cc: Pablo Neira Ayuso, netfilter-devel

On Thu, Nov 21, 2019 at 01:33:32PM +0100, Michal Rostecki wrote:
> This change fixes the following warnings:
> 
> mnl.c: In function ‘mnl_nft_flowtable_add’:
> mnl.c:1442:14: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration]
>   dev_array = calloc(len, sizeof(char *));
>               ^~~~~~
> mnl.c:1442:14: warning: incompatible implicit declaration of built-in function ‘calloc’
> mnl.c:1442:14: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
> mnl.c:1449:2: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
>   free(dev_array);
>   ^~~~
> mnl.c:1449:2: warning: incompatible implicit declaration of built-in function ‘free’
> mnl.c:1449:2: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
> 
> Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>

Fixes: 1698fca7d49ff ("mnl: remove artifical cap on 8 devices per flowtable")
Acked-by: Phil Sutter <phil@nwl.cc>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings
  2019-11-21 12:33 [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings Michal Rostecki
  2019-11-21 13:35 ` Phil Sutter
@ 2019-11-21 13:40 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2019-11-21 13:40 UTC (permalink / raw)
  To: Michal Rostecki; +Cc: netfilter-devel

On Thu, Nov 21, 2019 at 01:33:32PM +0100, Michal Rostecki wrote:
> This change fixes the following warnings:
> 
> mnl.c: In function ‘mnl_nft_flowtable_add’:
> mnl.c:1442:14: warning: implicit declaration of function ‘calloc’ [-Wimplicit-function-declaration]
>   dev_array = calloc(len, sizeof(char *));
>               ^~~~~~
> mnl.c:1442:14: warning: incompatible implicit declaration of built-in function ‘calloc’
> mnl.c:1442:14: note: include ‘<stdlib.h>’ or provide a declaration of ‘calloc’
> mnl.c:1449:2: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
>   free(dev_array);
>   ^~~~
> mnl.c:1449:2: warning: incompatible implicit declaration of built-in function ‘free’
> mnl.c:1449:2: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-21 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 12:33 [PATCH nft] mnl: Fix -Wimplicit-function-declaration warnings Michal Rostecki
2019-11-21 13:35 ` Phil Sutter
2019-11-21 13:40 ` Pablo Neira Ayuso

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.