From 2f1b7adcd3387bb2e5077c07f64ff71b2a399798 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 18 Mar 2016 15:48:45 -0400 Subject: tweak IGNORE_RET behavior a bit GCC will still warn about unused return value with the form: if (write(...)); Instead, change the semi-colon to an empty set of braces. BUG=chromium:428478 TEST=build+test still works --- src/common/linux/ignore_ret.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/linux/ignore_ret.h b/src/common/linux/ignore_ret.h index f60384bb..efd274c2 100644 --- a/src/common/linux/ignore_ret.h +++ b/src/common/linux/ignore_ret.h @@ -35,6 +35,6 @@ // the call fails, IGNORE_RET() can be used to mark the return code as ignored. // This avoids spurious compiler warnings. -#define IGNORE_RET(x) do { if (x); } while (0) +#define IGNORE_RET(x) do { if (x) {} } while (0) #endif // COMMON_LINUX_IGNORE_RET_H_ -- cgit v1.2.1