]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include: [c.h] move ignore_result() to gcc-only block
authorKarel Zak <kzak@redhat.com>
Mon, 7 Feb 2011 14:52:21 +0000 (15:52 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Feb 2011 14:52:21 +0000 (15:52 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/c.h

index 70e911ddc396d3520034719ed3d497388341b55d..02c29e960a00d9b7f66734deac06a4a5a94f6064 100644 (file)
 # 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)
 {