Skip to contentSkip to conversation

LVM2/lib/misc util.h

PATCH [email protected] 1 participant 1 message Apr 8, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-04-08 14:11:40

Modified files:
lib/misc : util.h

Log message:
Newer gcc doesn't need this trick

In fact it now generates an opposite warning about using undefined variable.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/util.h.diff?cvsroot=lvm2&r1=1.7&r2=1.8

lib/misc/util.h +1 -1
@@ -25,7 +25,7 @@
 		     (void) (&_a == &_b); \
 		     _a > _b ? _a : _b; })
 
-#ifdef __clang__
+#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
 #define uninitialized_var(x) x
 #else
 #define uninitialized_var(x) x = x