From 06ceeef851dbb9d6c75fed4bb4420bfadacf5d47 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 4 Jan 2011 21:34:45 +0100 Subject: [PATCH] lib: [c] add ignore_result() Signed-off-by: Karel Zak --- include/c.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/c.h b/include/c.h index bed8f5ba..cfee616f 100644 --- a/include/c.h +++ b/include/c.h @@ -62,6 +62,8 @@ _max1 > _max2 ? _max1 : _max2; }) #endif +#define ignore_result(x) ({ typeof(x) __dummy = (x); (void) __dummy; }) + static inline __attribute__((const)) int is_power_of_2(unsigned long num) { return (num != 0 && ((num & (num - 1)) == 0)); -- 2.39.5