Fix debug format specifiers
Some checks failed
Publish Docker Image / build-and-push-image (push) Has been cancelled

Fixes compiling with latest wut version
This commit is contained in:
GaryOderNichts
2025-05-31 00:34:19 +02:00
committed by Maschell
parent 630d9681bc
commit 89438aa9f3
12 changed files with 18 additions and 18 deletions

View File

@@ -167,7 +167,7 @@ MochaUtilsStatus Mocha_MountFSEx(const char *virt_name, const char *dev_path, co
if (dev_path) {
res = FSAMount(mount->clientHandle, dev_path, mount_path, mountFlags, mountArgBuf, mountArgBufLen);
if (res < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAMount(0x%08X, %s, %s, %08X, %08X, %08X) failed: %s", mount->clientHandle, dev_path, mount_path, mountFlags, mountArgBuf, mountArgBufLen, FSAGetStatusStr(res));
DEBUG_FUNCTION_LINE_ERR("FSAMount(0x%08X, %s, %s, %08X, %p, %08X) failed: %s", mount->clientHandle, dev_path, mount_path, mountFlags, mountArgBuf, mountArgBufLen, FSAGetStatusStr(res));
fsa_free(mount);
if (res == FS_ERROR_ALREADY_EXISTS) {
return MOCHA_RESULT_ALREADY_EXISTS;

View File

@@ -23,7 +23,7 @@ int __fsa_dirnext(struct _reent *r,
status = FSAReadDir(deviceData->clientHandle, dir->fd, &dir->entry_data);
if (status < 0) {
if (status != FS_ERROR_END_OF_DIR) {
DEBUG_FUNCTION_LINE_ERR("FSAReadDir(0x%08X, 0x%08X, 0x%08X) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAReadDir(0x%08X, 0x%08X, %p) (%s) failed: %s",
deviceData->clientHandle, dir->fd, &dir->entry_data, dir->name, FSAGetStatusStr(status));
}
r->_errno = __fsa_translate_error(status);

View File

@@ -28,7 +28,7 @@ __fsa_diropen(struct _reent *r,
auto *deviceData = (FSADeviceData *) r->deviceData;
status = FSAOpenDir(deviceData->clientHandle, dir->name, &fd);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAOpenDir(0x%08X, %s, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAOpenDir(0x%08X, %s, %p) failed: %s",
deviceData->clientHandle, dir->name, &fd, FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
return nullptr;

View File

@@ -20,7 +20,7 @@ int __fsa_fstat(struct _reent *r,
status = FSAGetStatFile(deviceData->clientHandle, file->fd, &fsStat);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, 0x%08X) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, %p) (%s) failed: %s",
deviceData->clientHandle, file->fd, &fsStat, file->fullPath, FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
return -1;

View File

@@ -92,7 +92,7 @@ int __fsa_open(struct _reent *r,
}
fd = -1;
} else {
DEBUG_FUNCTION_LINE_ERR("FSAOpenFileEx(0x%08X, %s, %s, 0x%X, 0x%08X, 0x%08X, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAOpenFileEx(0x%08X, %s, %s, 0x%X, 0x%08X, 0x%08X, %p) failed: %s",
deviceData->clientHandle, file->fullPath, "w", translatedMode, openFlags, preAllocSize, &fd,
FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
@@ -113,7 +113,7 @@ int __fsa_open(struct _reent *r,
status = FSAOpenFileEx(deviceData->clientHandle, file->fullPath, fsMode, translatedMode, openFlags, preAllocSize, &fd);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAOpenFileEx(0x%08X, %s, %s, 0x%X, 0x%08X, 0x%08X, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAOpenFileEx(0x%08X, %s, %s, 0x%X, 0x%08X, 0x%08X, %p) failed: %s",
deviceData->clientHandle, file->fullPath, fsMode, translatedMode, openFlags, preAllocSize, &fd,
FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
@@ -129,11 +129,11 @@ int __fsa_open(struct _reent *r,
FSAStat stat;
status = FSAGetStatFile(deviceData->clientHandle, fd, &stat);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, 0x%08X) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, %p) (%s) failed: %s",
deviceData->clientHandle, fd, &stat, file->fullPath, FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
if (FSACloseFile(deviceData->clientHandle, fd) < 0) {
DEBUG_FUNCTION_LINE_ERR("FSACloseFile(0x%08X, 0x%08X) (%d) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSACloseFile(0x%08X, 0x%08X) (%s) failed: %s",
deviceData->clientHandle, fd, file->fullPath, FSAGetStatusStr(status));
}
return -1;

View File

@@ -52,7 +52,7 @@ ssize_t __fsa_read(struct _reent *r, void *fd, char *ptr, size_t len) {
status = FSAReadFile(deviceData->clientHandle, tmp, 1, size, file->fd, 0);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAReadFile(0x%08X, 0x%08X, 1, 0x%08X, 0x%08X, 0) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAReadFile(0x%08X, %p, 1, 0x%08X, 0x%08X, 0) (%s) failed: %s",
deviceData->clientHandle, tmp, size, file->fd, file->fullPath, FSAGetStatusStr(status));
if (bytesRead != 0) {
return bytesRead; // error after partial read

View File

@@ -33,7 +33,7 @@ off_t __fsa_seek(struct _reent *r,
case SEEK_END: { // Set position relative to the end of the file
status = FSAGetStatFile(deviceData->clientHandle, file->fd, &fsStat);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, 0x%08X) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAGetStatFile(0x%08X, 0x%08X, %p) (%s) failed: %s",
deviceData->clientHandle, file->fd, &fsStat, file->fullPath, FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
return -1;

View File

@@ -23,7 +23,7 @@ int __fsa_stat(struct _reent *r,
status = FSAGetStat(deviceData->clientHandle, fixedPath, &fsStat);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAGetStat(0x%08X, %s, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAGetStat(0x%08X, %s, %p) failed: %s",
deviceData->clientHandle, fixedPath, &fsStat, FSAGetStatusStr(status));
free(fixedPath);
r->_errno = __fsa_translate_error(status);

View File

@@ -20,7 +20,7 @@ int __fsa_statvfs(struct _reent *r,
status = FSAGetFreeSpaceSize(deviceData->clientHandle, fixedPath, &freeSpace);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAGetFreeSpaceSize(0x%08X, %s, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAGetFreeSpaceSize(0x%08X, %s, %p) failed: %s",
deviceData->clientHandle, fixedPath, &freeSpace, FSAGetStatusStr(status));
free(fixedPath);
r->_errno = __fsa_translate_error(status);

View File

@@ -21,7 +21,7 @@ int __fsa_ftruncate(struct _reent *r,
// Set the new file size
status = FSASetPosFile(deviceData->clientHandle, file->fd, len);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSASetPosFile(0x%08X, 0x%08X, 0x%08X) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSASetPosFile(0x%08X, 0x%08X, 0x%08llX) failed: %s",
deviceData->clientHandle, file->fd, len, FSAGetStatusStr(status));
r->_errno = __fsa_translate_error(status);
return -1;

View File

@@ -60,7 +60,7 @@ ssize_t __fsa_write(struct _reent *r, void *fd, const char *ptr, size_t len) {
status = FSAWriteFile(deviceData->clientHandle, tmp, 1, size, file->fd, 0);
if (status < 0) {
DEBUG_FUNCTION_LINE_ERR("FSAWriteFile(0x%08X, 0x%08X, 1, 0x%08X, 0x%08X, 0) (%s) failed: %s",
DEBUG_FUNCTION_LINE_ERR("FSAWriteFile(0x%08X, %p, 1, 0x%08X, 0x%08X, 0) (%s) failed: %s",
deviceData->clientHandle, tmp, size, file->fd, file->fullPath, FSAGetStatusStr(status));
if (bytesWritten != 0) {
return bytesWritten; // error after partial write

View File

@@ -104,10 +104,10 @@ FSError FSAEx_RawReadEx(int clientHandle, void *data, uint32_t size_bytes, uint3
if ((uint32_t) data & 0x3F) {
auto *alignedBuffer = memalign(0x40, ROUNDUP(size_bytes * cnt, 0x40));
if (!alignedBuffer) {
DEBUG_FUNCTION_LINE_ERR("Buffer not aligned (%08X).\n", data);
DEBUG_FUNCTION_LINE_ERR("Buffer not aligned (%p).\n", data);
return FS_ERROR_INVALID_ALIGNMENT;
}
DEBUG_FUNCTION_LINE_WARN("Buffer not aligned (%08X). Align to 0x40 for best performance\n", data);
DEBUG_FUNCTION_LINE_WARN("Buffer not aligned (%p). Align to 0x40 for best performance\n", data);
tmp = alignedBuffer;
}
@@ -162,10 +162,10 @@ FSError FSAEx_RawWriteEx(int clientHandle, const void *data, uint32_t size_bytes
if ((uint32_t) data & 0x3F) {
auto *alignedBuffer = memalign(0x40, ROUNDUP(size_bytes * cnt, 0x40));
if (!alignedBuffer) {
DEBUG_FUNCTION_LINE_ERR("Buffer not aligned (%08X).", data);
DEBUG_FUNCTION_LINE_ERR("Buffer not aligned (%p).", data);
return FS_ERROR_INVALID_ALIGNMENT;
}
DEBUG_FUNCTION_LINE_WARN("Buffer not aligned (%08X). Align to 0x40 for best performance", data);
DEBUG_FUNCTION_LINE_WARN("Buffer not aligned (%p). Align to 0x40 for best performance", data);
tmp = alignedBuffer;
memcpy(tmp, data, size_bytes * cnt);
}