Skip to content

Commit

Permalink
core: arm: plat-versal: Add maybe_unused attribute to constant strings
Browse files Browse the repository at this point in the history
If log level is set to print only EMSGs, constant strings can be unused.
Add maybe_unused attribute to prevent compilation errors.

Signed-off-by: Sriram Sriram <sriramsriram@microsoft.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
  • Loading branch information
sriramsriram-msft committed Aug 10, 2023
1 parent 7ebfbe9 commit 0513a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/arch/arm/plat-versal/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ static TEE_Result platform_banner(void)
{
vaddr_t plm_rtca = (vaddr_t)phys_to_virt(PLM_RTCA, MEM_AREA_IO_SEC,
PLM_RTCA_LEN);
const char *ahwrot_str = "OFF";
const char *shwrot_str = "OFF";
const char __maybe_unused *ahwrot_str = "OFF";
const char __maybe_unused *shwrot_str = "OFF";
uint8_t version = 0;

assert(plm_rtca);
Expand Down

0 comments on commit 0513a00

Please sign in to comment.