From eb1f5d54c29f915efe73e63287ba896abcb355e1 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Tue, 8 Apr 2025 14:36:28 +0200 Subject: [PATCH] fix: ensure CC_ASSERT retain line info Can't find a background to why this inline wrapper existed around the assert call. --- src/linux/sys/osal_cc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/linux/sys/osal_cc.h b/src/linux/sys/osal_cc.h index 7103750..10fdcca 100644 --- a/src/linux/sys/osal_cc.h +++ b/src/linux/sys/osal_cc.h @@ -34,11 +34,6 @@ extern "C" { #define CLANG_ANALYZER_NORETURN #endif -static inline void cc_assert (int exp) CLANG_ANALYZER_NORETURN -{ - assert (exp); // LCOV_EXCL_LINE -} - #define CC_PACKED_BEGIN #define CC_PACKED_END #define CC_PACKED __attribute__ ((packed)) @@ -83,7 +78,7 @@ static inline void cc_assert (int exp) CLANG_ANALYZER_NORETURN #define CC_ATOMIC_SET32(p, v) __atomic_store_n ((p), (v), __ATOMIC_SEQ_CST) #define CC_ATOMIC_SET64(p, v) __atomic_store_n ((p), (v), __ATOMIC_SEQ_CST) -#define CC_ASSERT(exp) cc_assert (exp) +#define CC_ASSERT(exp) assert (exp) #ifdef __cplusplus #define CC_STATIC_ASSERT(exp) static_assert (exp, "")