From 91707a60e858b7501505e3ecc2e510a51ef931b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Wed, 7 Oct 2020 16:07:23 +0000 Subject: [PATCH] fe310: Fix debug format strings read_csr() returns an unsigned long, not a uint32_t. This causes a -Wformat warning to be emitted when compiling with clang. This commit fixes the warning by changing the format string. --- cpu/fe310/irq_arch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/fe310/irq_arch.c b/cpu/fe310/irq_arch.c index 85bbbd0b18724..481419dbea729 100644 --- a/cpu/fe310/irq_arch.c +++ b/cpu/fe310/irq_arch.c @@ -112,8 +112,8 @@ void handle_trap(uint32_t mcause) #ifdef DEVELHELP printf("Unhandled trap:\n"); printf(" mcause: 0x%"PRIx32"\n", mcause); - printf(" mepc: 0x%"PRIx32"\n", read_csr(mepc)); - printf(" mtval: 0x%"PRIx32"\n", read_csr(mtval)); + printf(" mepc: 0x%lx\n", read_csr(mepc)); + printf(" mtval: 0x%lx\n", read_csr(mtval)); #endif /* Unknown trap */ core_panic(PANIC_GENERAL_ERROR, "Unhandled trap");