mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-11 17:30:25 +00:00
Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)
* Fix some more GCC warnings, mark some bugs based on GCC warnings * Weird formatting * Suggested changes * More weird indentation I guess * UNREACHABLE() macro, add missing NORETURNs to fault_n64.c * AVOID_UB for PAL path in z_file_nameset.c * Remove comments about return types * Remove temp no longer needed
This commit is contained in:
parent
6199634ffb
commit
3f703a39d9
39 changed files with 156 additions and 83 deletions
|
@ -410,6 +410,7 @@ s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) {
|
|||
sample->sampleAddr = sampleAddr;
|
||||
}
|
||||
}
|
||||
//! @bug Missing return, but the return value is never used so it's fine.
|
||||
}
|
||||
|
||||
s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) {
|
||||
|
@ -426,6 +427,7 @@ s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) {
|
|||
if (instrument->normalRangeHi != 0x7F) {
|
||||
return AudioLoad_SyncLoadSample(instrument->highPitchTunedSample.sample, fontId);
|
||||
}
|
||||
//! @bug Missing return, but the return value is never used so it's fine.
|
||||
} else if (instId == 0x7F) {
|
||||
Drum* drum = Audio_GetDrum(fontId, drumId);
|
||||
|
||||
|
@ -508,10 +510,10 @@ s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2) {
|
|||
|
||||
gAudioCtx.seqPlayers[playerIdx].skipTicks = 0;
|
||||
AudioLoad_SyncInitSeqPlayerInternal(playerIdx, seqId, arg2);
|
||||
// Intentionally missing return. Returning the result of the above function
|
||||
// call matches but is UB because it too is missing a return, and using the
|
||||
// result of a non-void function that has failed to return a value is UB.
|
||||
// The callers of this function do not use the return value, so it's fine.
|
||||
//! @bug Missing return. Returning the result of the above function call
|
||||
//! matches but is UB because it too is missing a return, and using the
|
||||
//! result of a non-void function that has failed to return a value is UB.
|
||||
//! The callers of this function do not use the return value, so it's fine.
|
||||
}
|
||||
|
||||
s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks) {
|
||||
|
@ -521,7 +523,7 @@ s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks
|
|||
|
||||
gAudioCtx.seqPlayers[playerIdx].skipTicks = skipTicks;
|
||||
AudioLoad_SyncInitSeqPlayerInternal(playerIdx, seqId, 0);
|
||||
// Missing return, see above.
|
||||
//! @bug Missing return, see comment in AudioLoad_SyncInitSeqPlayer above.
|
||||
}
|
||||
|
||||
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue