9
0
Fork 0

Fixe compilation warning

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 <chantra@debuntu.org>
This commit is contained in:
Emmanuel Bretelle 2010-09-07 15:56:02 +02:00 committed by Harald Welte
parent 68521860e0
commit 2a7cad57ef
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ int process_options(int argc, char **argv) {
return -1; return -1;
} }
options.apn.l = strlen(args_info.apn_arg); 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; options.apn.v[sizeof(options.apn.v)-1] = 0;
printf("Using APN: %s\n", args_info.apn_arg); printf("Using APN: %s\n", args_info.apn_arg);