diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2022-05-16 17:41:23 +0000 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2022-05-17 14:30:42 +0200 |
commit | 2fa8c6349e9a1d965757d44f05a6c72687850b77 (patch) | |
tree | ba9b955998c75da2d55ee947f67ddbd6c559eaba /plat/imx | |
parent | 53b01a6d84ec33263b7a6f35b2ee339748686192 (diff) |
imx8m/hab.c: work around gcc 12.1 false positivestoradex_imx_5.4.70_2.3.0
| 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))
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'plat/imx')
-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; } |