commit 72683a408b77add58380ae2e04153d4567d6300e
parent 94004f84490569c746f53716a2425e9119b5af72
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Sun, 4 May 2025 19:03:14 +0200
mhd_itc: fixed compiler warnings
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/mhd2/mhd_itc.h b/src/mhd2/mhd_itc.h
@@ -112,9 +112,9 @@ static const uint_fast64_t mhd_ITC_WR_DATA = 1;
* Clear signalled state on @a itc
* @param itc the itc to clear
*/
-#define mhd_itc_clear(itc) \
- do { uint_fast64_t mhd__b; \
- (void) read ((itc).fd, (void*) &mhd__b, 8); \
+#define mhd_itc_clear(itc) \
+ do { uint_fast64_t mhd__b; \
+ (void) (0 > read ((itc).fd, (void*) &mhd__b, 8)); \
} while (0)
/**
@@ -177,11 +177,11 @@ static const uint_fast64_t mhd_ITC_WR_DATA = 1;
# if defined(MHD_USE_PIPE2)
# define mhd_itc_init(pitc) (! pipe2 ((pitc)->fd, O_CLOEXEC | O_NONBLOCK))
# else /* ! MHD_USE_PIPE2 */
-# define mhd_itc_init(pitc) \
- ( (! pipe ((pitc)->fd)) ? \
- (mhd_itc_nonblocking ((pitc)) ? \
- (! 0) : \
- (mhd_itc_destroy (*(pitc)), 0) ) \
+# define mhd_itc_init(pitc) \
+ ( (! pipe ((pitc)->fd)) ? \
+ (mhd_itc_nonblocking ((pitc)) ? \
+ (! 0) : \
+ ((void) mhd_itc_destroy (*(pitc)), 0) ) \
: (0) )
# define MHD_HAVE_MHD_ITC_NONBLOCKING 1