diff options
| author | Tharo <17233964+Thar0@users.noreply.github.com> | 2024-12-02 09:40:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 04:40:49 -0500 |
| commit | 3f703a39d91b0f90a273ca24fedfc7e6578ad363 (patch) | |
| tree | 43437f65da1a62794a87e29d28a9bf4df5e2c6b5 /src/audio | |
| parent | 6199634ffb42872d053abb1502eb80474de4ae56 (diff) | |
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
Diffstat (limited to 'src/audio')
| -rw-r--r-- | src/audio/lib/load.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/audio/lib/load.c b/src/audio/lib/load.c index 99217c61f..3e66c7932 100644 --- a/src/audio/lib/load.c +++ b/src/audio/lib/load.c @@ -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) { |
