Cast second value of a ?: to void in estream.c.
authorWerner Koch <wk@gnupg.org>
Fri, 30 Mar 2012 13:29:35 +0000 (15:29 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 30 Mar 2012 13:29:35 +0000 (15:29 +0200)
* common/estream.c (ESTREAM_MUTEX_LOCK): Cast pth_mutex_acquire result
to void.  Some compilers choke on mixing void and int in an
conditional operator.  Reported by Nelson H. F. Beebe.

common/estream.c

index 2d68415..3b6139e 100644 (file)
@@ -176,7 +176,7 @@ static int estream_pth_killed;
 # define ESTREAM_MUTEX_INITIALIZER PTH_MUTEX_INIT
 # define ESTREAM_MUTEX_LOCK(mutex)                              \
   (estream_pth_killed ? dummy_mutex_call_void ((mutex))         \
 # define ESTREAM_MUTEX_INITIALIZER PTH_MUTEX_INIT
 # define ESTREAM_MUTEX_LOCK(mutex)                              \
   (estream_pth_killed ? dummy_mutex_call_void ((mutex))         \
-   : pth_mutex_acquire (&(mutex), 0, NULL))
+   : (void)pth_mutex_acquire (&(mutex), 0, NULL))
 # define ESTREAM_MUTEX_UNLOCK(mutex)                            \
   (estream_pth_killed ? dummy_mutex_call_void ((mutex))         \
    : pth_mutex_release (&(mutex)))
 # define ESTREAM_MUTEX_UNLOCK(mutex)                            \
   (estream_pth_killed ? dummy_mutex_call_void ((mutex))         \
    : pth_mutex_release (&(mutex)))