]> granicus.if.org Git - gc/commitdiff
Workaround 'expression is only useful for its side effects' WCC warning
authorIvan Maidanski <ivmai@mail.ru>
Mon, 15 Jul 2019 06:24:04 +0000 (09:24 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 16 Jul 2019 07:20:36 +0000 (10:20 +0300)
* include/ec.h (CORD_ac_append): Cast result of ternary operator to
void.

include/ec.h

index 6375220cd22ca9a666d0a02088bc4cd8a5b68187..7473a5996b1bbd3367344a3acd9a945e2d58c3ee 100644 (file)
@@ -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  */