From e8b0da6f171bfcfbc3ff5f4a332de5eb9e871faa Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 15 Jul 2019 09:24:04 +0300 Subject: [PATCH] Workaround 'expression is only useful for its side effects' WCC warning * include/ec.h (CORD_ac_append): Cast result of ternary operator to void. --- include/ec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ec.h b/include/ec.h index 6375220..7473a59 100644 --- a/include/ec.h +++ b/include/ec.h @@ -61,8 +61,8 @@ void CORD_ec_flush_buf(CORD_ec x); /* Append a character to an extensible cord. */ #define CORD_ec_append(x, c) \ - (((x)[0].ec_bufptr == (x)[0].ec_buf + CORD_BUFSZ ? \ - (CORD_ec_flush_buf(x), 0) : 0), \ + ((void)((x)[0].ec_bufptr == (x)[0].ec_buf + CORD_BUFSZ \ + ? (CORD_ec_flush_buf(x), 0) : 0), \ (void)(*(x)[0].ec_bufptr++ = (c))) /* Append a cord to an extensible cord. Structure remains shared with */ -- 2.7.4