From dfcabf71f0246847ab89b19056bcdd517efcced5 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Mon, 14 May 2012 09:23:18 +0000 Subject: [PATCH] Fix compiler warning uart_posix.c:55:1: warning: initialization discards 'const' qualifier from pointer target type [enabled by default] --- libnfc/buses/uart_posix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libnfc/buses/uart_posix.c b/libnfc/buses/uart_posix.c index db689d6..c319880 100644 --- a/libnfc/buses/uart_posix.c +++ b/libnfc/buses/uart_posix.c @@ -48,11 +48,11 @@ # if defined(__APPLE__) // FIXME: find UART connection string for PN53X device on Mac OS X when multiples devices are used -char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", NULL }; +const char *serial_ports_device_radix[] = { "tty.SLAB_USBtoUART", NULL }; # elif defined (__FreeBSD__) || defined (__OpenBSD__) -char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; +const char *serial_ports_device_radix[] = { "cuaU", "cuau", NULL }; # elif defined (__linux__) -char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", NULL }; +const char *serial_ports_device_radix[] = { "ttyUSB", "ttyS", NULL }; # else # error "Can't determine serial string for your system" # endif @@ -346,7 +346,7 @@ uart_list_ports (void) if (!isdigit (pdDirEnt->d_name[strlen (pdDirEnt->d_name) - 1])) continue; - char **p = serial_ports_device_radix; + const char **p = serial_ports_device_radix; while (*p) { if (!strncmp(pdDirEnt->d_name, *p, strlen (*p))) { char **res2 = realloc (res, (szRes+1) * sizeof (char *));