[lvm-devel] [PATCH 12/15] Skip compilation of debug code
Zdenek Kabelac
zkabelac at redhat.com
Mon Jan 24 10:50:36 UTC 2011
When it's not in use - do not compile this code.
Improves code coverage results.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
libdm/mm/dbg_malloc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libdm/mm/dbg_malloc.c b/libdm/mm/dbg_malloc.c
index db7f5f3..5f06d1e 100644
--- a/libdm/mm/dbg_malloc.c
+++ b/libdm/mm/dbg_malloc.c
@@ -15,6 +15,8 @@
#include "dmlib.h"
+#ifdef DEBUG_MEM
+
#include <assert.h>
#include <stdarg.h>
@@ -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)))
{
--
1.7.3.5
More information about the lvm-devel
mailing list