From 15ddfa8b80e2f21fdb4732f6a3e274fdbd67d0c6 Mon Sep 17 00:00:00 2001 From: Hess Nathan Date: Fri, 26 Apr 2024 10:20:16 +0200 Subject: [PATCH] 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 --- include/zephyr/app_memory/app_memdomain.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/zephyr/app_memory/app_memdomain.h b/include/zephyr/app_memory/app_memdomain.h index 08e28982ad6..d53a3d2266a 100644 --- a/include/zephyr/app_memory/app_memdomain.h +++ b/include/zephyr/app_memory/app_memdomain.h @@ -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