From 19adb54cd8eea2f401720157fdedd866e3a90489 Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 24 Dec 2022 21:07:58 -0800 Subject: [PATCH] Fix compiler warnings. These were detected by github Actions but not by Xcode. --- core/timermanager.cpp | 4 ++-- cpu/ppc/ppcexceptions.cpp | 2 +- cpu/ppc/ppcmmu.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/timermanager.cpp b/core/timermanager.cpp index 1ae438e..7ea2dc7 100644 --- a/core/timermanager.cpp +++ b/core/timermanager.cpp @@ -32,7 +32,7 @@ TimerManager* TimerManager::timer_manager; uint32_t TimerManager::add_oneshot_timer(uint64_t timeout, timer_cb cb) { if (!timeout || timeout <= MIN_TIMEOUT_NS) { - LOG_F(WARNING, "One-shot timer too short, timeout=%llu ns", timeout); + LOG_F(WARNING, "One-shot timer too short, timeout=%llu ns", (long long unsigned)timeout); } TimerInfo* ti = new TimerInfo; @@ -58,7 +58,7 @@ uint32_t TimerManager::add_oneshot_timer(uint64_t timeout, timer_cb cb) uint32_t TimerManager::add_cyclic_timer(uint64_t interval, timer_cb cb) { if (!interval || interval <= MIN_TIMEOUT_NS) { - LOG_F(WARNING, "Cyclic timer interval too short, timeout=%llu ns", interval); + LOG_F(WARNING, "Cyclic timer interval too short, timeout=%llu ns", (long long unsigned)interval); } TimerInfo* ti = new TimerInfo; diff --git a/cpu/ppc/ppcexceptions.cpp b/cpu/ppc/ppcexceptions.cpp index 17825e3..0356c49 100644 --- a/cpu/ppc/ppcexceptions.cpp +++ b/cpu/ppc/ppcexceptions.cpp @@ -100,7 +100,7 @@ void ppc_exception_handler(Except_Type exception_type, uint32_t srr1_bits) { break; default: - ABORT_F("Unknown exception occured: %X\n", exception_type); + ABORT_F("Unknown exception occured: %X\n", (unsigned)exception_type); break; } diff --git a/cpu/ppc/ppcmmu.cpp b/cpu/ppc/ppcmmu.cpp index 1c9a9a7..9e08900 100644 --- a/cpu/ppc/ppcmmu.cpp +++ b/cpu/ppc/ppcmmu.cpp @@ -968,7 +968,7 @@ void mmu_print_regs() } } - LOG_F(INFO, ""); + LOG_F(INFO, "%s", ""); LOG_F(INFO, "SDR1 = 0x%X", ppc_state.spr[SPR::SDR1]); LOG_F(INFO, "Segment registers:");