diff options
-rw-r--r-- | plat/imx/imx8m/hab.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plat/imx/imx8m/hab.c b/plat/imx/imx8m/hab.c index 17ad4207..cc74cf07 100644 --- a/plat/imx/imx8m/hab.c +++ b/plat/imx/imx8m/hab.c @@ -90,6 +90,15 @@ int imx_hab_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, hab_rvt_failsafe_t *hab_rvt_failsafe; hab_rvt_check_target_t *hab_rvt_check_target; +/* work around gcc 12.1 false positives */ +/* +| plat/imx/imx8m/hab.c: In function 'imx_hab_handler': +| plat/imx/imx8m/hab.c:64:57: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds] +| 64 | #define HAB_RVT_CHECK_TARGET_ARM64 ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18)) +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" switch(x1) { case IMX_SIP_HAB_AUTHENTICATE: hab_rvt_authenticate_image = hab_rvt_authenticate_image_p; @@ -117,6 +126,7 @@ int imx_hab_handler(uint32_t smc_fid, u_register_t x1, u_register_t x2, return SMC_UNK; }; +#pragma GCC diagnostic pop return 0; } |