From: Zdenek Kabelac Date: Fri, 28 Jan 2011 16:01:32 +0000 (+0000) Subject: Compile code for memory debuging only with DEBUG_MEM X-Git-Tag: old-v2_02_83~35 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=76b030d82e41af35b982356c94e950f386ebb954;p=lvm2.git Compile code for memory debuging only with DEBUG_MEM When it's not in use - do not compile this code. Improves lcov code coverage results for this code a lot :) --- diff --git a/libdm/mm/dbg_malloc.c b/libdm/mm/dbg_malloc.c index db7f5f3ed..5f06d1e27 100644 --- a/libdm/mm/dbg_malloc.c +++ b/libdm/mm/dbg_malloc.c @@ -15,6 +15,8 @@ #include "dmlib.h" +#ifdef DEBUG_MEM + #include #include @@ -249,6 +251,8 @@ void dm_bounds_check_debug(void) } } +#endif + void *dm_malloc_aux(size_t s, const char *file __attribute__((unused)), int line __attribute__((unused))) {