From 69c0d323a9e85d19d523c67c7addaa9bee778dac Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 6 Feb 2023 16:51:03 +0800 Subject: [PATCH] porting: Fix SYSINIT_PANIC_ASSERT_MSG refinition warning porting/npl/nuttx/include/nimble/nimble_npl_os.h:40: warning: "SYSINIT_PANIC_ASSERT_MSG" redefined 40 | #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \ | nimble/host/services/tps/src/ble_svc_tps.c:22: porting/nimble/include/sysinit/sysinit.h:32: note: this is the location of the previous definition 32 | #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) assert(rc) | Signed-off-by: Xiang Xiao --- porting/npl/linux/include/nimble/nimble_npl_os.h | 7 ------- porting/npl/nuttx/include/nimble/nimble_npl_os.h | 7 ------- 2 files changed, 14 deletions(-) diff --git a/porting/npl/linux/include/nimble/nimble_npl_os.h b/porting/npl/linux/include/nimble/nimble_npl_os.h index 585d37852..17e61b22a 100644 --- a/porting/npl/linux/include/nimble/nimble_npl_os.h +++ b/porting/npl/linux/include/nimble/nimble_npl_os.h @@ -37,13 +37,6 @@ extern "C" { #define SYSINIT_PANIC_MSG(msg) __assert_fail(msg, __FILE__, __LINE__, __func__) -#define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \ -{ \ - if (!(rc)) { \ - SYSINIT_PANIC_MSG(msg); \ - } \ -} while (0) - #ifdef __cplusplus } #endif diff --git a/porting/npl/nuttx/include/nimble/nimble_npl_os.h b/porting/npl/nuttx/include/nimble/nimble_npl_os.h index 0f765f5a3..a2fcbc42e 100644 --- a/porting/npl/nuttx/include/nimble/nimble_npl_os.h +++ b/porting/npl/nuttx/include/nimble/nimble_npl_os.h @@ -37,13 +37,6 @@ extern "C" { #define SYSINIT_PANIC_MSG(msg) { fprintf(stderr, "%s\n", msg); abort(); } -#define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \ -{ \ - if (!(rc)) { \ - SYSINIT_PANIC_MSG(msg); \ - } \ -} while (0) - #ifdef __cplusplus } #endif