diff options
| author | Roman971 <32455037+Roman971@users.noreply.github.com> | 2022-06-16 02:15:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-15 20:15:44 -0400 |
| commit | 08c8126ba55c11b8774721dedec3a5d8993503cd (patch) | |
| tree | b19dace8340a2eba1c61f07209462e57565b8fe3 /src/code/fault.c | |
| parent | 5299208291dc3032954b8b2242be2be9c7b6c7c0 (diff) | |
Enable int-conversion warnings and fix all current instances (#1280)
* Enable int-conversion warnings for gcc/clang
* Fix all current int-conversion warnings
* Run format.sh
* Apply review suggestions
Diffstat (limited to 'src/code/fault.c')
| -rw-r--r-- | src/code/fault.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/code/fault.c b/src/code/fault.c index 99a4a1ddf..6edb90b55 100644 --- a/src/code/fault.c +++ b/src/code/fault.c @@ -335,7 +335,7 @@ uintptr_t Fault_ConvertAddress(uintptr_t addr) { while (client != NULL) { if (client->callback != NULL) { - ret = Fault_ProcessClient(client->callback, addr, client->arg); + ret = Fault_ProcessClient(client->callback, (void*)addr, client->arg); if (ret == -1) { Fault_RemoveAddrConvClient(client); } else if (ret != 0) { @@ -1093,9 +1093,9 @@ void Fault_ResumeThread(OSThread* thread) { thread->context.cause = 0; thread->context.fpcsr = 0; thread->context.pc += sizeof(u32); - *(u32*)thread->context.pc = 0x0000000D; // write in a break instruction - osWritebackDCache(thread->context.pc, 4); - osInvalICache(thread->context.pc, 4); + *((u32*)thread->context.pc) = 0x0000000D; // write in a break instruction + osWritebackDCache((void*)thread->context.pc, 4); + osInvalICache((void*)thread->context.pc, 4); osStartThread(thread); } @@ -1112,7 +1112,7 @@ void Fault_DisplayFrameBuffer(void) { } else { fb = osViGetNextFramebuffer(); if ((uintptr_t)fb == K0BASE) { - fb = (PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])); + fb = (void*)(PHYS_TO_K0(osMemSize) - sizeof(u16[SCREEN_HEIGHT][SCREEN_WIDTH])); } } |
