From 2a7cad57efcd70a660d1619a8eb4f8efc88bb0d8 Mon Sep 17 00:00:00 2001 From: Emmanuel Bretelle Date: Tue, 7 Sep 2010 15:56:02 +0200 Subject: [PATCH] Fixe compilation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relevant output of make: sgsnemu.c: In function ‘process_options’: sgsnemu.c:443: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness /usr/include/bits/string3.h:120: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ Signed-off-by: Emmanuel Bretelle --- sgsnemu/sgsnemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c index 9b5c2e2..ead8839 100644 --- a/sgsnemu/sgsnemu.c +++ b/sgsnemu/sgsnemu.c @@ -440,7 +440,7 @@ int process_options(int argc, char **argv) { return -1; } options.apn.l = strlen(args_info.apn_arg); - strncpy(options.apn.v, args_info.apn_arg, sizeof(options.apn.v)); + strncpy((char *)options.apn.v, args_info.apn_arg, sizeof(options.apn.v)); options.apn.v[sizeof(options.apn.v)-1] = 0; printf("Using APN: %s\n", args_info.apn_arg);