From f94029a85d5d644046c0f11bc6f644650b2f420f Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 10 Mar 2021 01:05:42 +0800 Subject: [PATCH] Check _DEBUG is defined before using it to avoid the preprocess warning Signed-off-by: Xiang Xiao Change-Id: I4ae1eb8533563d377ec8614f0c9428c8734e1f2c --- tlsf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tlsf.c b/tlsf.c index af575737c7..380e032a29 100644 --- a/tlsf.c +++ b/tlsf.c @@ -1045,8 +1045,8 @@ void tlsf_remove_pool(tlsf_t tlsf, pool_t pool) ** TLSF main interface. */ -#if _DEBUG -int test_ffs_fls() +#if defined(_DEBUG) && _DEBUG +static int test_ffs_fls() { /* Verify ffs/fls work properly. */ int rv = 0; @@ -1075,7 +1075,7 @@ int test_ffs_fls() tlsf_t tlsf_create(void* mem) { -#if _DEBUG +#if defined(_DEBUG) && _DEBUG if (test_ffs_fls()) { return 0;