diff options
author | Karel Zak | 2011-02-07 15:52:21 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-07 15:52:21 +0100 |
commit | 2dd570ec85a4f9477a6064b8d59fdbc614db7b35 (patch) | |
tree | 0501ce6804e8fcaafde0e0017007655115566051 /include/c.h | |
parent | libmount: add and copy FS internal flags (diff) | |
download | kernel-qcow2-util-linux-2dd570ec85a4f9477a6064b8d59fdbc614db7b35.tar.gz kernel-qcow2-util-linux-2dd570ec85a4f9477a6064b8d59fdbc614db7b35.tar.xz kernel-qcow2-util-linux-2dd570ec85a4f9477a6064b8d59fdbc614db7b35.zip |
include: [c.h] move ignore_result() to gcc-only block
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/c.h')
-rw-r--r-- | include/c.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/c.h b/include/c.h index 70e911ddc..02c29e960 100644 --- a/include/c.h +++ b/include/c.h @@ -16,9 +16,12 @@ # define __must_be_array(a) \ BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) +# define ignore_result(x) ({ typeof(x) __dummy = (x); (void) __dummy; }) + #else /* !__GNUC__ */ # define __must_be_array(a) 0 # define __attribute__(_arg_) +# define ignore_result(x) ((void) (x)) #endif /* !__GNUC__ */ @@ -62,7 +65,6 @@ _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) { |