diff --git a/configure.ac b/configure.ac index f01644b..b8589d0 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # Enable more compiler warnings. -CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes" +CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow" # Checks for programs. AC_PROG_CC diff --git a/libserialport_internal.h b/libserialport_internal.h index 6a8c877..6a682cb 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -224,7 +224,7 @@ extern void (*sp_debug_handler)(const char *format, ...); #define TRACE(fmt, ...) DEBUG_FMT("%s(" fmt ") called", __func__, __VA_ARGS__) #define TRACE_VOID() DEBUG_FMT("%s() called", __func__) -#define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0) +#define TRY(x) do { int retval = x; if (retval != SP_OK) RETURN_CODEVAL(retval); } while (0) SP_PRIV struct sp_port **list_append(struct sp_port **list, const char *portname);