summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-05-26 22:27:01 +0300
committerMichael Widenius <monty@askmonty.org>2010-05-26 22:27:01 +0300
commit9e23495b1dc988526776768f50a30f647d793d14 (patch)
tree8f5166007a2603ef6cb45ddd08beca6b6da3a3fd /include/my_global.h
parent2d43ff67ddab70e6fb89682e201cb788c845e71e (diff)
downloadmariadb-git-9e23495b1dc988526776768f50a30f647d793d14.tar.gz
Added macros to inform valgrind that memory is uninitialized
include/Makefile.am: Make my_valgrind.h global (as it's used by my_global.h) include/my_global.h: Include my_valgrind.h include/my_sys.h: TRASH() moved to my_valgrind.h include/my_valgrind.h: Add VALGRIND defines to mark memory mysys/my_alloc.c: Mark internal freed memory as undefined
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 2c64f25626b..a32db3c87b6 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -566,18 +566,14 @@ int __void__;
#define LINT_INIT(var)
#endif
+#include <my_valgrind.h>
+
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_valgrind)
#define VALGRIND_OR_LINT_INIT(var) var=0
#else
#define VALGRIND_OR_LINT_INIT(var)
#endif
-#ifdef HAVE_valgrind
-#define IF_VALGRIND(A,B) (A)
-#else
-#define IF_VALGRIND(A,B) (B)
-#endif
-
/*
Suppress uninitialized variable warning without generating code.