From: Ivan Maidanski Date: Mon, 15 Jul 2019 06:24:04 +0000 (+0300) Subject: Workaround 'expression is only useful for its side effects' WCC warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8b0da6f171bfcfbc3ff5f4a332de5eb9e871faa;p=gc Workaround 'expression is only useful for its side effects' WCC warning * include/ec.h (CORD_ac_append): Cast result of ternary operator to void. --- diff --git a/include/ec.h b/include/ec.h index 6375220c..7473a599 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 */