From 37c28f694a066c9cc3707a5d23e1be5430bd5377 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Fri, 30 Sep 2016 09:03:25 +0200 Subject: [PATCH] Undef VALGRIND_*_SPACE macros at the end of sources (#1382) Defining the same macros in multiple source files can cause macro re-definition warnings or errors in all-in-one builds. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu --- jerry-core/jmem/jmem-heap.c | 7 +++++++ jerry-core/jmem/jmem-poolman.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/jerry-core/jmem/jmem-heap.c b/jerry-core/jmem/jmem-heap.c index 371c86b34..eb91f9482 100644 --- a/jerry-core/jmem/jmem-heap.c +++ b/jerry-core/jmem/jmem-heap.c @@ -690,6 +690,13 @@ jmem_heap_stat_free_iter () } /* jmem_heap_stat_free_iter */ #endif /* JMEM_STATS */ +#undef VALGRIND_NOACCESS_SPACE +#undef VALGRIND_UNDEFINED_SPACE +#undef VALGRIND_DEFINED_SPACE +#undef VALGRIND_FREYA_CHECK_MEMPOOL_REQUEST +#undef VALGRIND_FREYA_MALLOCLIKE_SPACE +#undef VALGRIND_FREYA_FREELIKE_SPACE + /** * @} * @} diff --git a/jerry-core/jmem/jmem-poolman.c b/jerry-core/jmem/jmem-poolman.c index ec3ba841c..1e19b6cf9 100644 --- a/jerry-core/jmem/jmem-poolman.c +++ b/jerry-core/jmem/jmem-poolman.c @@ -337,6 +337,12 @@ jmem_pools_stat_dealloc (void) } /* jmem_pools_stat_dealloc */ #endif /* JMEM_STATS */ +#undef VALGRIND_NOACCESS_SPACE +#undef VALGRIND_UNDEFINED_SPACE +#undef VALGRIND_DEFINED_SPACE +#undef VALGRIND_FREYA_MALLOCLIKE_SPACE +#undef VALGRIND_FREYA_FREELIKE_SPACE + /** * @} * @}