netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libnftnl PATCH] src: cleanup in mxml and jansson regarding set_id parsing
@ 2014-10-10 19:43 Arturo Borrero Gonzalez
  2014-10-11 10:27 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2014-10-10 19:43 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pablo, alvaroneay

jansson.c: In function 'nft_jansson_expr_parse':
jansson.c:212:6: warning: pointer targets in passing argument 3 of 'nft_set_lookup_id' differ in signedness [-Wpointer-sign]
In file included from jansson.c:10:0:
./internal.h:95:5: note: expected 'uint32_t *' but argument is of type 'int *'
jansson.c:195:18: warning: unused variable 'set_cur' [-Wunused-variable]
mxml.c: In function 'nft_mxml_expr_parse':
mxml.c:97:6: warning: pointer targets in passing argument 3 of 'nft_set_lookup_id' differ in signedness [-Wpointer-sign]
In file included from mxml.c:12:0:
internal.h:95:5: note: expected 'uint32_t *' but argument is of type 'int *'
mxml.c:68:18: warning: unused variable 'set_cur' [-Wunused-variable]

Spotted with: gcc (Debian 4.7.2-5) 4.7.2

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/jansson.c |    4 ++--
 src/mxml.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/jansson.c b/src/jansson.c
index 728de12..4c7968a 100644
--- a/src/jansson.c
+++ b/src/jansson.c
@@ -192,8 +192,8 @@ struct nft_rule_expr *nft_jansson_expr_parse(json_t *root,
 {
 	struct nft_rule_expr *e;
 	const char *type;
-	struct nft_set *set_cur = NULL;
-	int ret, set_id;
+	uint32_t set_id;
+	int ret;
 
 	type = nft_jansson_parse_str(root, "type", err);
 	if (type == NULL)
diff --git a/src/mxml.c b/src/mxml.c
index 22d482f..a97d380 100644
--- a/src/mxml.c
+++ b/src/mxml.c
@@ -65,8 +65,8 @@ struct nft_rule_expr *nft_mxml_expr_parse(mxml_node_t *node,
 	struct nft_rule_expr *e;
 	const char *expr_name;
 	char *xml_text;
-	struct nft_set *set_cur = NULL;
-	int ret, set_id;
+	uint32_t set_id;
+	int ret;
 
 	expr_name = mxmlElementGetAttr(node, "type");
 	if (expr_name == NULL) {


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

* Re: [libnftnl PATCH] src: cleanup in mxml and jansson regarding set_id parsing
  2014-10-10 19:43 [libnftnl PATCH] src: cleanup in mxml and jansson regarding set_id parsing Arturo Borrero Gonzalez
@ 2014-10-11 10:27 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-10-11 10:27 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: netfilter-devel, alvaroneay

On Fri, Oct 10, 2014 at 09:43:44PM +0200, Arturo Borrero Gonzalez wrote:
> jansson.c: In function 'nft_jansson_expr_parse':
> jansson.c:212:6: warning: pointer targets in passing argument 3 of 'nft_set_lookup_id' differ in signedness [-Wpointer-sign]
> In file included from jansson.c:10:0:
> ./internal.h:95:5: note: expected 'uint32_t *' but argument is of type 'int *'
> jansson.c:195:18: warning: unused variable 'set_cur' [-Wunused-variable]
> mxml.c: In function 'nft_mxml_expr_parse':
> mxml.c:97:6: warning: pointer targets in passing argument 3 of 'nft_set_lookup_id' differ in signedness [-Wpointer-sign]
> In file included from mxml.c:12:0:
> internal.h:95:5: note: expected 'uint32_t *' but argument is of type 'int *'
> mxml.c:68:18: warning: unused variable 'set_cur' [-Wunused-variable]

Oops, thanks Arturo.

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

end of thread, other threads:[~2014-10-11 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 19:43 [libnftnl PATCH] src: cleanup in mxml and jansson regarding set_id parsing Arturo Borrero Gonzalez
2014-10-11 10:27 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).