From 096397097c437337ddfbdd4bf99e4d8067d10201 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Wed, 20 Nov 2013 12:12:07 +0000 Subject: [PATCH] Use better way to ignore unused return value - thanks to Adriano --- extern/editline/config.h.in | 3 +-- src/common/common.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extern/editline/config.h.in b/extern/editline/config.h.in index ac1cb897a3..b7e2db91f9 100644 --- a/extern/editline/config.h.in +++ b/extern/editline/config.h.in @@ -295,5 +295,4 @@ #undef LIBC_SCCS #define lint -#define EL_UNUSED(a) if (a) - +#define EL_UNUSED(a) do { if(a); } while (0) diff --git a/src/common/common.h b/src/common/common.h index 212a3afa43..1096047552 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -890,7 +890,7 @@ void GDS_breakpoint(int); #define FB_FINAL #endif -#define FB_UNUSED(value) if (value) +#define FB_UNUSED(value) do { if(value); } while (false) // 30 Dec 2002. Nickolay Samofatov // This needs to be checked for all supported platforms