Fix warnings

This commit is contained in:
Maschell
2026-01-15 16:50:01 +01:00
parent 58a3963ce8
commit 3d4f22ec00
11 changed files with 35 additions and 34 deletions

View File

@@ -63,7 +63,7 @@ HeapMemoryFixedSizePool::operator bool() const {
HeapMemoryFixedSizePool::MemorySegmentInfo HeapMemoryFixedSizePool::operator[](const int idx) const {
if (idx < 0 || idx >= static_cast<int>(mSegmentInfos.size())) {
DEBUG_FUNCTION_LINE_ERR("Out of bounce access (tried to access index %d; size is", idx, mSegmentInfos.size());
DEBUG_FUNCTION_LINE_ERR("Out of bounce access (tried to access index %d; size is %d", idx, mSegmentInfos.size());
}
return mSegmentInfos[idx];
}

View File

@@ -100,7 +100,7 @@ void ConfigUtils::displayMenu() {
WUPSConfigAPIStatus callbackResult = configData->CallMenuOpenedCallback(configHandleOpt.value());
config = WUPSConfigAPIBackend::Intern::PopConfigByHandle(configHandleOpt.value());
if (!config) {
DEBUG_FUNCTION_LINE_ERR("Failed to get config for handle: %08X", configHandleOpt.value().handle);
DEBUG_FUNCTION_LINE_ERR("Failed to get config for handle: %p", configHandleOpt.value().handle);
} else if (callbackResult != WUPSCONFIG_API_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("Callback failed for %s: %s", info.name.c_str(), WUPSConfigAPI_GetStatusStr(callbackResult));
config.reset();
@@ -122,7 +122,7 @@ void ConfigUtils::displayMenu() {
}
config = WUPSConfigAPIBackend::Intern::PopConfigByHandle(WUPSConfigHandle(cur_config_handle));
if (!config) {
DEBUG_FUNCTION_LINE_ERR("Failed to find config for handle: %08X", cur_config_handle);
DEBUG_FUNCTION_LINE_ERR("Failed to find config for handle: %p", cur_config_handle);
}
break;
}

View File

@@ -1,5 +1,6 @@
#pragma once
#include <coreinit/debug.h>
#include <string.h>
#include <whb/log.h>

View File

@@ -404,7 +404,7 @@ namespace StorageUtils {
// TODO: handle write error?
if (!remove_first_if(gStorage, [&root](auto &cur) { return cur.getHandle() == reinterpret_cast<uint32_t>(root); })) {
DEBUG_FUNCTION_LINE_WARN("Failed to close storage: Not opened (\"%08X\")", root);
DEBUG_FUNCTION_LINE_WARN("Failed to close storage: Not opened (\"%pX\")", root);
return WUPS_STORAGE_ERROR_NOT_FOUND;
}
return res;

View File

@@ -61,7 +61,7 @@ void dumpHex(const void *data, const size_t size) {
char ascii[17];
size_t i, j;
ascii[16] = '\0';
DEBUG_FUNCTION_LINE("0x%08X (0x0000): ", data);
DEBUG_FUNCTION_LINE("0x%p (0x0000): ", data);
for (i = 0; i < size; ++i) {
WHBLogWritef("%02X ", ((unsigned char *) data)[i]);
if (((unsigned char *) data)[i] >= ' ' && ((unsigned char *) data)[i] <= '~') {