mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
arch/arm64/src/common/arm64_fatal.c: Fix compilation warning with -Wextra
Wextra complains on some silly issues, like this one. Work around the issue in code directly. Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
c1553464bb
commit
4ba8723ab8
@@ -78,7 +78,6 @@ static int default_fatal_handler(uint64_t *regs, uint64_t far, uint64_t esr);
|
||||
|
||||
static const char *g_esr_class_str[] =
|
||||
{
|
||||
[0 ... ESR_ELX_EC_MAX] = "UNRECOGNIZED EC",
|
||||
[ESR_ELX_EC_UNKNOWN] = "Unknown/Uncategorized",
|
||||
[ESR_ELX_EC_WFX] = "WFI/WFE",
|
||||
[ESR_ELX_EC_CP15_32] = "CP15 MCR/MRC",
|
||||
@@ -126,7 +125,6 @@ static const char *g_esr_class_str[] =
|
||||
|
||||
static const char *g_esr_desc_str[] =
|
||||
{
|
||||
[0 ... ESR_ELX_EC_MAX] = "UNRECOGNIZED EC",
|
||||
[ESR_ELX_EC_UNKNOWN] = "Unknown/Uncategorized",
|
||||
[ESR_ELX_EC_WFX] = "Trapped WFI or WFE instruction execution",
|
||||
[ESR_ELX_EC_CP15_32] = "Trapped MCR or MRC access with"
|
||||
@@ -299,8 +297,18 @@ static const char *esr_get_desc_string(uint64_t esr)
|
||||
|
||||
static void print_ec_cause(uint64_t esr)
|
||||
{
|
||||
serr("%s\n", esr_get_class_string(esr));
|
||||
serr("%s\n", esr_get_desc_string(esr));
|
||||
const char *class_string = esr_get_class_string(esr);
|
||||
const char *desc_string = esr_get_desc_string(esr);
|
||||
|
||||
if (class_string && desc_string)
|
||||
{
|
||||
serr("%s\n", class_string);
|
||||
serr("%s\n", desc_string);
|
||||
}
|
||||
else
|
||||
{
|
||||
serr("UNRECOGNIZED EC\n");
|
||||
}
|
||||
}
|
||||
|
||||
static int default_fatal_handler(uint64_t *regs, uint64_t far, uint64_t esr)
|
||||
|
||||
Reference in New Issue
Block a user