diff options
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/include/my_global.h b/include/my_global.h index 057c613d64c..dcfd607b455 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -442,19 +442,6 @@ extern "C" int madvise(void *addr, size_t len, int behav); /* don't assume that STDERR_FILENO is 2, mysqld can freopen */ #undef STDERR_FILENO -/* - Deprecated workaround for false-positive uninitialized variables - warnings. Those should be silenced using tool-specific heuristics. - - Enabled by default for g++ due to the bug referenced below. -*/ -#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ - (defined(__GNUC__) && defined(__cplusplus)) -#define LINT_INIT(var) var= 0 -#else -#define LINT_INIT(var) -#endif - #ifndef SO_EXT #ifdef _WIN32 #define SO_EXT ".dll" @@ -465,16 +452,21 @@ extern "C" int madvise(void *addr, size_t len, int behav); /* Suppress uninitialized variable warning without generating code. - - The _cplusplus is a temporary workaround for C++ code pending a fix - for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). */ -#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ - defined(__cplusplus) || !defined(__GNUC__) -#define UNINIT_VAR(x) x= 0 -#else +#if defined(__GNUC__) /* GCC specific self-initialization which inhibits the warning. */ #define UNINIT_VAR(x) x= x +#elif defined(_lint) || defined(FORCE_INIT_OF_VARS) +#define UNINIT_VAR(x) x= 0 +#else +#define UNINIT_VAR(x) x +#endif + +/* This is only to be used when reseting variables in a class constructor */ +#if defined(_lint) || defined(FORCE_INIT_OF_VARS) +#define LINT_INIT(x) x= 0 +#else +#define LINT_INIT(x) #endif #if !defined(HAVE_UINT) @@ -1244,9 +1236,6 @@ static inline double rint(double x) #undef HAVE_SMEM /* No shared memory */ #else -#ifdef WITH_NDB_BINLOG -#define HAVE_NDB_BINLOG 1 -#endif #define HAVE_REPLICATION #define HAVE_EXTERNAL_CLIENT #endif /* EMBEDDED_LIBRARY */ |