summaryrefslogtreecommitdiff
path: root/gpsmon.c
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 /gpsmon.c
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 'gpsmon.c')
-rw-r--r--gpsmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index bee05b83..4cb3b2db 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -838,7 +838,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
if (logfile != NULL && device->lexer.outbuflen > 0) {
/*@ -shiftimplementation -sefparams +charint @*/
- size_t written_count = fwrite
+ UNUSED size_t written_count = fwrite
(device->lexer.outbuffer, sizeof(char),
device->lexer.outbuflen, logfile);
assert(written_count >= 1);