coding guidelines: comply with MISRA Rule 20.9
- avoid to use undefined macros in #if expressions Signed-off-by: Hess Nathan <nhess@baumer.com>
This commit is contained in:
parent
c30a9c4c97
commit
c878e3fcad
|
@ -43,7 +43,7 @@
|
|||
__device_states_end = .;
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
|
||||
|
||||
#if CONFIG_PM_DEVICE
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
ITERABLE_SECTION_RAM(pm_device_slots, Z_LINK_ITERABLE_SUBALIGN)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ struct log_msg_hdr {
|
|||
/* Attempting to keep best alignment. When address is 64 bit and timestamp 32
|
||||
* swap the order to have 16 byte header instead of 24 byte.
|
||||
*/
|
||||
#if (INTPTR_MAX > INT32_MAX) && !CONFIG_LOG_TIMESTAMP_64BIT
|
||||
#if (INTPTR_MAX > INT32_MAX) && !defined(CONFIG_LOG_TIMESTAMP_64BIT)
|
||||
log_timestamp_t timestamp;
|
||||
const void *source;
|
||||
#else
|
||||
|
|
|
@ -12,15 +12,21 @@
|
|||
|
||||
#ifdef CONFIG_ASSERT
|
||||
#ifndef __ASSERT_ON
|
||||
#ifdef CONFIG_ASSERT_LEVEL
|
||||
#define __ASSERT_ON CONFIG_ASSERT_LEVEL
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FORCE_NO_ASSERT
|
||||
#undef __ASSERT_ON
|
||||
#define __ASSERT_ON 0
|
||||
#endif
|
||||
|
||||
#ifndef __ASSERT_ON
|
||||
#define __ASSERT_ON 0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue