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
This commit is contained in:
Mike Frysinger 2016-03-18 15:48:45 -04:00
parent b0e5f26233
commit 2f1b7adcd3

View file

@ -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_