coding guidelines: comply with MISRA C:2012 Rule 11.2

avoid convert pointers to incomplete type using the pointer to first item

Signed-off-by: Hess Nathan <nhess@baumer.com>
This commit is contained in:
Hess Nathan 2024-04-26 10:20:16 +02:00 committed by Anas Nashif
parent 696edbe841
commit 15ddfa8b80
1 changed files with 4 additions and 4 deletions

View File

@ -128,16 +128,16 @@ struct z_app_region {
extern char Z_APP_START(name)[]; \
extern char Z_APP_SIZE(name)[]; \
struct k_mem_partition name = { \
.start = (uintptr_t) &Z_APP_START(name), \
.size = (size_t) &Z_APP_SIZE(name), \
.start = (uintptr_t) &Z_APP_START(name)[0], \
.size = (size_t) &Z_APP_SIZE(name)[0], \
.attr = K_MEM_PARTITION_P_RW_U_RW \
}; \
extern char Z_APP_BSS_START(name)[]; \
extern char Z_APP_BSS_SIZE(name)[]; \
Z_GENERIC_SECTION(.app_regions.name) \
const struct z_app_region name##_region = { \
.bss_start = &Z_APP_BSS_START(name), \
.bss_size = (size_t) &Z_APP_BSS_SIZE(name) \
.bss_start = &Z_APP_BSS_START(name)[0], \
.bss_size = (size_t) &Z_APP_BSS_SIZE(name)[0] \
}; \
Z_APPMEM_PLACEHOLDER(name)
#else