mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MEM_CHECK_DEFINED: replace HAVE_valgrind
HAVE_valgrind_or_MSAN to HAVE_valgrind was incorrect inaf784385b4. In my_valgrind.h when clang exists (hence no __has_feature(memory_sanitizer), and -DWITH_VALGRIND=1, but without memcheck.h, we end up with a MEM_CHECK_DEFINED being empty. If we are also doing a CMAKE_BUILD_TYPE=Debug this results a number of [-Werror,-Wunused-variable] errors because MEM_CHECK_DEFINED is empty. With MEM_CHECK_DEFINED empty, there becomes no uses of this of the fixed field and innodb variables in this patch. So we stop using HAVE_valgrind as catchall and use the name HAVE_CHECK_MEM to indicate that a CHECK_MEM_DEFINED function exists. Reviewer: Monty Corrects:af784385b4
This commit is contained in:
parent
e731a28394
commit
bcb9ca4105
5 changed files with 12 additions and 10 deletions
|
|
@ -637,14 +637,14 @@ Use MONITOR_DEC if appropriate mutex protection exists.
|
|||
} \
|
||||
}
|
||||
|
||||
#ifdef HAVE_valgrind
|
||||
#ifdef HAVE_MEM_CHECK
|
||||
# define MONITOR_CHECK_DEFINED(value) do { \
|
||||
mon_type_t m = value; \
|
||||
MEM_CHECK_DEFINED(&m, sizeof m); \
|
||||
} while (0)
|
||||
#else /* HAVE_valgrind */
|
||||
#else /* HAVE_MEM_CHECK */
|
||||
# define MONITOR_CHECK_DEFINED(value) (void) 0
|
||||
#endif /* HAVE_valgrind */
|
||||
#endif /* HAVE_MEM_CHECK */
|
||||
|
||||
#define MONITOR_INC_VALUE(monitor, value) \
|
||||
MONITOR_CHECK_DEFINED(value); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue