public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/misc util.h
@ 2010-10-26 10:04 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2010-10-26 10:04 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2010-10-26 10:04:35
Modified files:
lib/misc : util.h
Log message:
Macro uninitialized_var gives warnings in static analysis
Deactivate uninitialized_var() macro for clang static analysis.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/util.h.diff?cvsroot=lvm2&r1=1.6&r2=1.7
--- LVM2/lib/misc/util.h 2010/05/24 23:11:35 1.6
+++ LVM2/lib/misc/util.h 2010/10/26 10:04:34 1.7
@@ -25,7 +25,11 @@
(void) (&_a == &_b); \
_a > _b ? _a : _b; })
+#ifdef __clang__
+#define uninitialized_var(x) x
+#else
#define uninitialized_var(x) x = x
+#endif
#define KERNEL_VERSION(major, minor, release) (((major) << 16) + ((minor) << 8) + (release))
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2/lib/misc util.h
@ 2011-04-08 14:11 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2011-04-08 14:11 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@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
--- LVM2/lib/misc/util.h 2010/10/26 10:04:34 1.7
+++ LVM2/lib/misc/util.h 2011/04/08 14:11:40 1.8
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-08 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26 10:04 LVM2/lib/misc util.h zkabelac
2011-04-08 14:11 zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).