diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-04-17 09:41:19 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-17 09:41:19 -0600 |
| commit | 900a9f0f852d81870983c35bcc8ac2a30f0a4324 (patch) | |
| tree | 883c243bdbf90525d4cd62d1508c599ed93e3a79 /src/os | |
| parent | a4f103258c5b7afe6db31593bccf43c8038dfda9 (diff) | |
Remove some warnings (#609)
* Remove some warnings
* Update torch to latest version
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/__osDevMgrMain.c | 2 | ||||
| -rwxr-xr-x | src/os/guMtxCatL.c | 3 | ||||
| -rw-r--r-- | src/os/is_debug.c | 13 | ||||
| -rw-r--r-- | src/os/osPfsAllocateFile.c | 2 | ||||
| -rw-r--r-- | src/os/osPfsDeleteFile.c | 2 | ||||
| -rwxr-xr-x | src/os/osPfsFreeBlocks.c | 3 | ||||
| -rw-r--r-- | src/os/osPfsInit.c | 2 | ||||
| -rw-r--r-- | src/os/osPfsReadWriteFile.c | 2 | ||||
| -rw-r--r-- | src/os/osSyncPrintf.c | 5 |
9 files changed, 19 insertions, 15 deletions
diff --git a/src/os/__osDevMgrMain.c b/src/os/__osDevMgrMain.c index 06fe91e3b..62f2c6ffd 100644 --- a/src/os/__osDevMgrMain.c +++ b/src/os/__osDevMgrMain.c @@ -5,6 +5,8 @@ #include "new_func.h" +void osYieldThread(void); + void __osDevMgrMain(void *args) { OSIoMesg *mb; OSMesg em; diff --git a/src/os/guMtxCatL.c b/src/os/guMtxCatL.c index 7903b18b1..82fd4c597 100755 --- a/src/os/guMtxCatL.c +++ b/src/os/guMtxCatL.c @@ -34,6 +34,7 @@ #include <PR/gu.h> void guMtxXFMF(Mtx *, float, float, float, float *, float *, float *); +void guMtxCatF(float mf[4][4], float nf[4][4], float res[4][4]); void guMtxCatL(Mtx *m, Mtx *n, Mtx *res) { float mf[4][4], nf[4][4], resf[4][4]; @@ -51,5 +52,5 @@ void guMtxXFML(Mtx *m, float x, float y, float z, float *ox, float *oy, float *o guMtxL2F(mf, m); - guMtxXFMF(mf, x, y, z, ox, oy, oz); + guMtxXFMF((Mtx *)mf, x, y, z, ox, oy, oz); } diff --git a/src/os/is_debug.c b/src/os/is_debug.c index 0e4fcddda..1663a6c28 100644 --- a/src/os/is_debug.c +++ b/src/os/is_debug.c @@ -5,6 +5,7 @@ #include <PR/os.h> #include "hardware.h" + // Note: This file was very quickly strewn together from oot. // Not great but it works. @@ -23,6 +24,8 @@ typedef struct { #define ASCII_TO_U32(a, b, c, d) ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0))) void* is_proutSyncPrintf(void* arg, const char* str, u32 count); +s32 __osEPiRawWriteIo(OSPiHandle *a0, u32 a1, u32 a2); +void __osPiRelAccess(void); s32 __osEPiRawReadIo(OSPiHandle *arg0, u32 devAddr, u32 *data) { register s32 stat; @@ -65,7 +68,7 @@ void osSyncPrintfUnused(const char* fmt, ...) { va_list args; va_start(args, fmt); - _Printf(is_proutSyncPrintf, NULL, fmt, args); + _Printf((char *(*)(char *, const char *, size_t))is_proutSyncPrintf, NULL, fmt, args); va_end(args); } @@ -74,7 +77,7 @@ void osSyncPrintf(const char* fmt, ...) { va_list args; va_start(args, fmt); - _Printf(is_proutSyncPrintf, NULL, fmt, args); + _Printf((char *(*)(char *, const char *, size_t))is_proutSyncPrintf, NULL, fmt, args); va_end(args); } @@ -83,7 +86,7 @@ void print(const char* fmt, ...) { va_list args; va_start(args, fmt); - _Printf(is_proutSyncPrintf, NULL, fmt, args); + _Printf((char *(*)(char *, const char *, size_t))is_proutSyncPrintf, NULL, fmt, args); va_end(args); } @@ -93,12 +96,12 @@ void rmonPrintf(const char* fmt, ...) { va_list args; va_start(args, fmt); - _Printf(is_proutSyncPrintf, NULL, fmt, args); + _Printf((char *(*)(char *, const char *, size_t))is_proutSyncPrintf, NULL, fmt, args); va_end(args); } -void* is_proutSyncPrintf(void* arg, const char* str, u32 count) { +void* is_proutSyncPrintf(UNUSED void* arg, const char* str, u32 count) { u32 data; s32 pos; s32 start; diff --git a/src/os/osPfsAllocateFile.c b/src/os/osPfsAllocateFile.c index 874cfecd3..655c57cd0 100644 --- a/src/os/osPfsAllocateFile.c +++ b/src/os/osPfsAllocateFile.c @@ -178,4 +178,4 @@ static s32 __osClearPage(OSPfs *pfs, int page_no, u8 *data, u8 bank) pfs->activebank = 0; ret = __osPfsSelectBank(pfs); return ret; -}
\ No newline at end of file +} diff --git a/src/os/osPfsDeleteFile.c b/src/os/osPfsDeleteFile.c index c0e628ad0..7ea124f8b 100644 --- a/src/os/osPfsDeleteFile.c +++ b/src/os/osPfsDeleteFile.c @@ -129,4 +129,4 @@ s32 __osBlockSum(OSPfs *pfs, u8 page_no, u16 *sum, u8 bank) pfs->activebank = 0; ret = __osPfsSelectBank(pfs); return ret; -}
\ No newline at end of file +} diff --git a/src/os/osPfsFreeBlocks.c b/src/os/osPfsFreeBlocks.c index f63c7b745..1ee3c026e 100755 --- a/src/os/osPfsFreeBlocks.c +++ b/src/os/osPfsFreeBlocks.c @@ -29,6 +29,3 @@ s32 osPfsFreeBlocks(OSPfs *pfs, s32 *bytes_not_used) *bytes_not_used = pages * PFS_ONE_PAGE * BLOCKSIZE; return 0; } - -/* -*/
\ No newline at end of file diff --git a/src/os/osPfsInit.c b/src/os/osPfsInit.c index 9a91ba456..e5449af06 100644 --- a/src/os/osPfsInit.c +++ b/src/os/osPfsInit.c @@ -37,7 +37,7 @@ s32 __osPfsGetStatus(OSMesgQueue *queue, int channel) osRecvMesg(queue, &dummy, OS_MESG_BLOCK); ret = __osSiRawStartDma(OS_READ, &__osPfsPifRam); osRecvMesg(queue, &dummy, OS_MESG_BLOCK); - __osPfsGetInitData(&pattern, &data); + __osPfsGetInitData(&pattern, &data[0]); if (((data[channel].status & CONT_CARD_ON) != 0) && ((data[channel].status & CONT_CARD_PULL) != 0)) return PFS_ERR_NEW_PACK; diff --git a/src/os/osPfsReadWriteFile.c b/src/os/osPfsReadWriteFile.c index 697a726f4..b972147a2 100644 --- a/src/os/osPfsReadWriteFile.c +++ b/src/os/osPfsReadWriteFile.c @@ -98,4 +98,4 @@ s32 osPfsReadWriteFile(OSPfs *pfs, s32 file_no, u8 flag, int offset, int size_in } return 0; -}
\ No newline at end of file +} diff --git a/src/os/osSyncPrintf.c b/src/os/osSyncPrintf.c index 26bfc999d..34ac89c2f 100644 --- a/src/os/osSyncPrintf.c +++ b/src/os/osSyncPrintf.c @@ -1,12 +1,13 @@ #include "libultra_internal.h" #include "libc/stdarg.h" +#include "printf.h" // These funcs defined in is_debug.c #ifndef DEBUG -char *osSyncPrintf(char *arg0, const char *arg1, size_t size) { +char *osSyncPrintf(UNUSED char *arg0, UNUSED const char *arg1, UNUSED size_t size) { // ifdef'd formatting code? - return (1); + return (char *) (1); } void rmonPrintf(const char *fmt, ...) { |
