summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorKurt Schwehr <schwehr@gmail.com>2015-03-17 22:09:43 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-17 22:09:43 -0400
commitfeff33a7390d10da22f0bca5829b7c7b642ee266 (patch)
treee00f09775d0106076ea38623ce14c2b04bd6f80a /compiler.h
parentd8094dbd2f7213e3e521681459d50da2d175cd69 (diff)
downloadgpsd-feff33a7390d10da22f0bca5829b7c7b642ee266.tar.gz
Address Savannah bug #44566: Unused variable warnings with -DNDEBUG
With -Werror -DNDEBUG, these two cases end up failing with unused variables (gcc 4.9 with lots of patches on Linux). The attached patch solves the issue for me, but it's possible that it might be better with the UNUSEDs wrapped in
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler.h b/compiler.h
index f0041384..8159d776 100644
--- a/compiler.h
+++ b/compiler.h
@@ -40,7 +40,7 @@
/* Needed because 4.x versions of GCC are really annoying */
#define ignore_return(funcall) \
do { \
- ssize_t locresult = (funcall); \
+ UNUSED ssize_t locresult = (funcall); \
assert(locresult != -23); \
} while (0)