Add an error for implicit functions (#3017)
* Add the flag and fix errors * switch assert and skin matrix * new LUS * Use normal assert * hopefully fix WiiU Signed-off-by: Louis <louist103@pop-os.localdomain> --------- Signed-off-by: Louis <louist103@pop-os.localdomain> Co-authored-by: Louis <louist103@pop-os.localdomain> Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#ifndef __SWITCH__
|
||||
#ifdef __WIIU__
|
||||
void _assert(const char* exp, const char* file, s32 line) {
|
||||
#else
|
||||
void __assert(const char* exp, const char* file, s32 line) {
|
||||
#endif
|
||||
char msg[256];
|
||||
|
||||
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL));
|
||||
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
|
||||
Fault_AddHungupAndCrashImpl(msg, exp);
|
||||
}
|
||||
#endif
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
StackEntry sDmaMgrStackInfo;
|
||||
OSMesgQueue sDmaMgrMsgQueue;
|
||||
@@ -123,9 +125,9 @@ end:
|
||||
s32 DmaMgr_DmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
|
||||
s32 ret;
|
||||
|
||||
ASSERT(pihandle == gCartHandle);
|
||||
ASSERT(direction == OS_READ);
|
||||
ASSERT(mb != NULL);
|
||||
assert(pihandle == gCartHandle);
|
||||
assert(direction == OS_READ);
|
||||
assert(mb != NULL);
|
||||
|
||||
if (D_80009460 == 10) {
|
||||
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,
|
||||
@@ -183,14 +185,14 @@ void DmaMgr_Error(DmaRequest* req, const char* file, const char* errorName, cons
|
||||
osSyncPrintf(VT_RST);
|
||||
|
||||
if (req->filename) {
|
||||
sprintf(buff1, "DMA ERROR: %s %d", req->filename, req->line);
|
||||
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s %d", req->filename, req->line);
|
||||
} else if (sDmaMgrCurFileName) {
|
||||
sprintf(buff1, "DMA ERROR: %s %d", sDmaMgrCurFileName, sDmaMgrCurFileLine);
|
||||
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s %d", sDmaMgrCurFileName, sDmaMgrCurFileLine);
|
||||
} else {
|
||||
sprintf(buff1, "DMA ERROR: %s", errorName != NULL ? errorName : "???");
|
||||
snprintf(buff1, sizeof(buff1), "DMA ERROR: %s", errorName != NULL ? errorName : "???");
|
||||
}
|
||||
|
||||
sprintf(buff2, "%07X %08X %X %s", vrom, ram, size, file != NULL ? file : "???");
|
||||
snprintf(buff2, sizeof(buff1), "%07X %08X %X %s", vrom, ram, size, file != NULL ? file : "???");
|
||||
Fault_AddHungupAndCrashImpl(buff1, buff2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user