Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-25 04:24:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-25 04:24:13 +0300
commit8e812504b4c5408280fc3699d821448f65f17d05 (patch)
treef1c342e6a996a9bf63667458c416eaed437aca75 /source/blender/blenlib/intern/BLI_memiter.c
parentcaf52e3779a9e5e13055f7da963a2197481d43a4 (diff)
Cleanup: warnings building without ASAN
Diffstat (limited to 'source/blender/blenlib/intern/BLI_memiter.c')
-rw-r--r--source/blender/blenlib/intern/BLI_memiter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_memiter.c b/source/blender/blenlib/intern/BLI_memiter.c
index 2d3ba56d08e..4027a62bbcc 100644
--- a/source/blender/blenlib/intern/BLI_memiter.c
+++ b/source/blender/blenlib/intern/BLI_memiter.c
@@ -57,8 +57,9 @@
#if defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)
# include "sanitizer/asan_interface.h"
#else
-# define ASAN_POISON_MEMORY_REGION(addr, size) UNUSED_VARS(addr, size)
-# define ASAN_UNPOISON_MEMORY_REGION(addr, size) UNUSED_VARS(addr, size)
+/* Ensure return value is used. */
+# define ASAN_POISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL))
+# define ASAN_UNPOISON_MEMORY_REGION(addr, size) (void)(0 && ((size) != 0 && (addr) != NULL))
#endif
typedef uintptr_t data_t;