diff mbox series

Fix warning in server_general

Message ID 20241102204159.239698-1-stefano.babic@swupdate.org
State Accepted
Headers show
Series Fix warning in server_general | expand

Commit Message

Stefano Babic Nov. 2, 2024, 8:41 p.m. UTC
In file included from suricatta/server_general.c:30:
suricatta/server_general.c: In function ‘server_general_settings’:
suricatta/server_general.c:595:17: warning: pointer targets in passing argument 4 of ‘get_field_int’ differ in signedness [-Wpointer-sign]
  595 |                 &server_general.polling_interval);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 unsigned int *
include/parselib.h:100:35: note: in definition of macro ‘GET_FIELD_INT’
  100 |         get_field_int(p, e, path, dest)
      |                                   ^~~~
include/parselib.h:73:80: note: expected ‘int *’ but argument is of type ‘unsigned int *’

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 suricatta/server_general.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.43.0
diff mbox series

Patch

diff --git a/suricatta/server_general.c b/suricatta/server_general.c
index db5a60ae..f106bce1 100644
--- a/suricatta/server_general.c
+++ b/suricatta/server_general.c
@@ -592,7 +592,7 @@  static int server_general_settings(void *elem, void  __attribute__ ((__unused__)
 	}

 	GET_FIELD_INT(LIBCFG_PARSER, elem, "polldelay",
-		&server_general.polling_interval);
+		(int *)&server_general.polling_interval);

 	channel_settings(elem, &channel_data_defaults);