mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Fix many warnings (#195)
* Fix many warnings, mostly when using functions without including headers, and mostly in libultra files. Included a few warning ignores as well * Add another warning fix * Revert trailing comma for LogicUpdateRates
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
#include "types.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "stacks.h"
|
||||
#include "lib/src/os/piint.h"
|
||||
|
||||
extern OSMesgQueue __osPiAccessQueue;
|
||||
extern u32 __osPiAccessQueueEnabled;
|
||||
extern OSDevMgr __osPiDevMgr;
|
||||
void __osDevMgrMain(void);
|
||||
|
||||
// bss variables
|
||||
OSThread piThread;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x80079350 */
|
||||
|
||||
#include <assert.h>
|
||||
#include "sched.h"
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "f3ddkr.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "viint.h"
|
||||
|
||||
/*
|
||||
* private typedefs and defines
|
||||
@@ -68,6 +70,9 @@ s32 D_80126128[18];
|
||||
|
||||
/*******************************/
|
||||
|
||||
static void __scMain(void *arg);
|
||||
static s32 __scSchedule(OSSched *sc, OSScTask **sp, OSScTask **dp, s32 availRCP);
|
||||
|
||||
void osCreateScheduler(OSSched *sc, void *stack, OSPri priority, u8 mode, u8 numFields) {
|
||||
sc->curRSPTask = 0;
|
||||
sc->curRDPTask = 0;
|
||||
@@ -542,7 +547,7 @@ static s32 __scSchedule(OSSched *sc, OSScTask **sp, OSScTask **dp, s32 availRCP)
|
||||
*dp = gfx;
|
||||
avail &= ~OS_SC_DP;
|
||||
|
||||
if (avail & OS_SC_DP == 0)
|
||||
if ((avail & OS_SC_DP) == 0)
|
||||
assert(sc->curRDPTask == gfx);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x800D6440 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
s32 __osSpRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) {
|
||||
if (__osSpDeviceBusy())
|
||||
|
||||
@@ -16,8 +16,8 @@ struct __osThreadTail __osThreadTail = {0, -1};
|
||||
OSThread *__osRunQueue = (OSThread *)&__osThreadTail;
|
||||
OSThread *__osActiveQueue = (OSThread *)&__osThreadTail;
|
||||
|
||||
extern OSThread *__osRunningThread = NULL;
|
||||
extern OSThread *__osFaultedThread = NULL;
|
||||
OSThread *__osRunningThread = NULL;
|
||||
OSThread *__osFaultedThread = NULL;
|
||||
|
||||
void __osViSwapContext() {
|
||||
register OSViMode *vm;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "controller.h"
|
||||
#include "siint.h"
|
||||
|
||||
static void __osPackReadData(void);
|
||||
s32 osContStartReadData(OSMesgQueue *mq) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "controller.h"
|
||||
#include "siint.h"
|
||||
|
||||
#define HALF_MIL_CYLCES 500000U
|
||||
#define ONE_MIL_CYLCES 1000000U
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "piint.h"
|
||||
#include "osint.h"
|
||||
|
||||
void __osDevMgrMain(void *args) {
|
||||
OSIoMesg *mb;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
u8 hdwrBugFlag = 0;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x800CE210 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "siint.h"
|
||||
|
||||
s32 __osEepStatus(OSMesgQueue *mq, OSContStatus *data);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/* RAM_POS: 0x800D36A0 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800C8E30 */
|
||||
#include "libultra_internal.h"
|
||||
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
s32 osSendMesg(OSMesgQueue *mq, OSMesg msg, s32 flags) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x800CC840 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
extern OSThread *__osRunQueue;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x800C89A0 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
extern OSThread *__osRunQueue;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* RAM_POS: 0x800C8AF0 */
|
||||
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSThread *__osRunningThread;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "libultra_internal.h"
|
||||
#include "viint.h"
|
||||
|
||||
void *osViGetCurrentFramebuffer(void){
|
||||
void *osViGetCurrentFramebuffer(void) {
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "libultra_internal.h"
|
||||
#include "viint.h"
|
||||
|
||||
void *osViGetNextFramebuffer(void){
|
||||
void *osViGetNextFramebuffer(void) {
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "viint.h"
|
||||
#include "osint.h"
|
||||
|
||||
extern OSTime __osCurrentTime;
|
||||
extern u32 __osBaseCounter;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/* The comment below is needed for this file to be picked up by generate_ld */
|
||||
/* RAM_POS: 0x800C8CF0 */
|
||||
|
||||
#include "types.h"
|
||||
#include "macros.h"
|
||||
#include "PR/R4300.h"
|
||||
#include "libultra_internal.h"
|
||||
#include "osint.h"
|
||||
|
||||
u32 osVirtualToPhysical(void *addr) {
|
||||
if (IS_KSEG0(addr)) {
|
||||
|
||||
@@ -64,8 +64,9 @@ s32 osPfsReadWriteFile(OSPfs *pfs, s32 file_no, u8 flag, int offset, int size_in
|
||||
return PFS_ERR_INCONSISTENT;
|
||||
}
|
||||
|
||||
if (flag == PFS_READ && (dir.status & DIR_STATUS_OCCUPIED) == 0)
|
||||
if (flag == PFS_READ && (dir.status & DIR_STATUS_OCCUPIED) == 0) {
|
||||
return PFS_ERR_BAD_DATA;
|
||||
}
|
||||
|
||||
bank = -1;
|
||||
cur_block = offset / BLOCKSIZE;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user