arm/dataabort: fix compile warning

Error: arm/arm_dataabort.c:146:10: error: format '%x' expects argument of type 'unsigned int',
                                          but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  146 |   _alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147 |          regs[REG_PC], far, fsr);

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-06-09 11:33:47 +08:00 committed by Xiang Xiao
parent da5e978341
commit 2369e3cbc8
2 changed files with 3 additions and 2 deletions

View File

@ -143,7 +143,8 @@ void arm_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
segfault:
#endif
_alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n",
_alert("Data abort. "
"PC: %08" PRIx32 " FAR: %08" PRIx32 " FSR: %08" PRIx32 "\n",
regs[REG_PC], far, fsr);
PANIC_WITH_REGS("panic", regs);
}

View File

@ -544,7 +544,7 @@ static bool decode_insn(uintptr_t *regs, riscv_insn_ctx_t *ctx)
break;
#endif
default:
_alert("Uncompressed: %x\n", insn.insn);
_alert("Uncompressed: %lx\n", insn.insn);
return false;
}