From 765bd551990e906f457ec1145aea4f2bf5856547 Mon Sep 17 00:00:00 2001 From: kenneth <459864689@qq.com> Date: Fri, 4 Jun 2021 10:58:43 +0800 Subject: [PATCH] fix: fix NULL UNUSED redefined issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit change NULL、 UNUSED macro definition close https://gitee.com/openharmony/kernel_liteos_m/issues/I3E9S3 Signed-off-by: kenneth <459864689@qq.com> --- utils/los_compiler.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/utils/los_compiler.h b/utils/los_compiler.h index faf58bb4..fc36cc9f 100644 --- a/utils/los_compiler.h +++ b/utils/los_compiler.h @@ -335,7 +335,7 @@ typedef signed int INTPTR; #ifdef __cplusplus #define NULL 0L #else -#define NULL ((VOID *)0) +#define NULL ((void*)0) #endif #endif @@ -411,10 +411,7 @@ static inline UINT32 LOS_Align(UINT32 addr, UINT32 boundary) } while (0) #ifndef UNUSED -#define UNUSED(var) \ - do { \ - (void)var; \ - } while (0) +#define UNUSED(X) (void)X #endif #ifdef __cplusplus