diff options
| author | Max Roncace <me@caseif.net> | 2026-03-18 01:38:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 22:38:05 -0700 |
| commit | 6694c1b281a142972fce587bd20cd82ee65ab38f (patch) | |
| tree | 2537d09d5ab3d270eaca5143a4f2f2f65f4ecb49 /libs | |
| parent | 9f340b604b5ac3d19d330b7bd6a2d7355c58bc27 (diff) | |
Fix a bunch of compiler warnings and document several more bugs (#3130)
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JAudio2/JASAramStream.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JAudio2/JASAudioThread.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JAudio2/JASBasicBank.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JAudio2/JASCalc.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JAudio2/JASSeqParser.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JParticle/JPABaseShape.cpp | 6 | ||||
| -rw-r--r-- | libs/JSystem/src/JStudio/JStudio_JStage/control.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JUtility/JUTConsole.cpp | 2 | ||||
| -rw-r--r-- | libs/JSystem/src/JUtility/JUTException.cpp | 2 |
10 files changed, 13 insertions, 11 deletions
diff --git a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h index ff41bc4f01..4c3f0f75bb 100644 --- a/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h +++ b/libs/JSystem/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h @@ -3,6 +3,8 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" +class J3DMaterial; + /** * @ingroup jsystem-j3d * diff --git a/libs/JSystem/src/JAudio2/JASAramStream.cpp b/libs/JSystem/src/JAudio2/JASAramStream.cpp index ea0fb5776f..68a1b7988c 100644 --- a/libs/JSystem/src/JAudio2/JASAramStream.cpp +++ b/libs/JSystem/src/JAudio2/JASAramStream.cpp @@ -434,7 +434,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel, field_0x120 = 0; field_0x12c |= 2; if (field_0x0c4 < 0xffffffff) { - field_0x0c4++; + field_0x0c4 += 1; } field_0x0c0 = false; } diff --git a/libs/JSystem/src/JAudio2/JASAudioThread.cpp b/libs/JSystem/src/JAudio2/JASAudioThread.cpp index be06ff5388..8be67f3d60 100644 --- a/libs/JSystem/src/JAudio2/JASAudioThread.cpp +++ b/libs/JSystem/src/JAudio2/JASAudioThread.cpp @@ -89,7 +89,7 @@ void* JASAudioThread::run() { case AUDIOMSG_DSP: JUT_ASSERT(125, snIntCount != 0); - snIntCount--; + snIntCount -= 1; if (snIntCount == 0) { JASProbe::stop(7); JASDriver::finishDSPFrame(); diff --git a/libs/JSystem/src/JAudio2/JASBasicBank.cpp b/libs/JSystem/src/JAudio2/JASBasicBank.cpp index 510d7a718d..5a5a21be3d 100644 --- a/libs/JSystem/src/JAudio2/JASBasicBank.cpp +++ b/libs/JSystem/src/JAudio2/JASBasicBank.cpp @@ -21,7 +21,7 @@ bool JASBasicBank::getInstParam(int prg_no, int param_1, int param_2, JASInstParam* o_param) const { JASInst* inst = getInst(prg_no); if (inst == NULL) { - return NULL; + return false; } return inst->getParam(param_1, param_2, o_param); } diff --git a/libs/JSystem/src/JAudio2/JASCalc.cpp b/libs/JSystem/src/JAudio2/JASCalc.cpp index 339e09e4c6..55d4082623 100644 --- a/libs/JSystem/src/JAudio2/JASCalc.cpp +++ b/libs/JSystem/src/JAudio2/JASCalc.cpp @@ -5,7 +5,7 @@ #include <limits> void JASCalc::imixcopy(const s16* s1, const s16* s2, s16* dst, u32 n) { - for (n; n != 0; n--) { + for (; n != 0; n--) { *dst++ = *(s1)++; *dst++ = *(s2)++; } diff --git a/libs/JSystem/src/JAudio2/JASSeqParser.cpp b/libs/JSystem/src/JAudio2/JASSeqParser.cpp index e68d880e17..fa3060952a 100644 --- a/libs/JSystem/src/JAudio2/JASSeqParser.cpp +++ b/libs/JSystem/src/JAudio2/JASSeqParser.cpp @@ -295,7 +295,7 @@ u32 JASSeqParser::readReg(JASTrack* param_0, u32 param_1) const { case 0x6a: result = param_0->getReleasePrio(); // @bug this should have been <<= - result << 8; + (void)(result << 8); result |= param_0->getNoteOnPrio(); break; case 0x6b: diff --git a/libs/JSystem/src/JParticle/JPABaseShape.cpp b/libs/JSystem/src/JParticle/JPABaseShape.cpp index fffcf05cad..f28add564e 100644 --- a/libs/JSystem/src/JParticle/JPABaseShape.cpp +++ b/libs/JSystem/src/JParticle/JPABaseShape.cpp @@ -1260,7 +1260,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) { } if (isTexAnm()) { - JUT_ASSERT(1698, pBsd->texAnmKeyNum != NULL); + JUT_ASSERT(1698, pBsd->texAnmKeyNum != 0); u32 offs = sizeof(JPABaseShapeData); if (isTexCrdAnm()) { offs += 0x28; @@ -1271,7 +1271,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) { } if (isPrmAnm()) { - JUT_ASSERT(1707, pBsd->prmAnmKeyNum != NULL); + JUT_ASSERT(1707, pBsd->prmAnmKeyNum != 0); JPAClrAnmKeyData* anmKeyData = (JPAClrAnmKeyData*)(pData + pBsd->mClrPrmAnmOffset); makeColorTable(&mpPrmClrAnmTbl, anmKeyData, pBsd->prmAnmKeyNum, pBsd->mClrAnmFrmMax, pHeap); @@ -1280,7 +1280,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) { } if (isEnvAnm()) { - JUT_ASSERT(1716, pBsd->envAnmKeyNum != NULL); + JUT_ASSERT(1716, pBsd->envAnmKeyNum != 0); JPAClrAnmKeyData* anmKeyData = (JPAClrAnmKeyData*)(pData + pBsd->mClrEnvAnmOffset); makeColorTable(&mpEnvClrAnmTbl, anmKeyData, pBsd->envAnmKeyNum, pBsd->mClrAnmFrmMax, pHeap); diff --git a/libs/JSystem/src/JStudio/JStudio_JStage/control.cpp b/libs/JSystem/src/JStudio/JStudio_JStage/control.cpp index 5ba81c8fc9..641348b87b 100644 --- a/libs/JSystem/src/JStudio/JStudio_JStage/control.cpp +++ b/libs/JSystem/src/JStudio/JStudio_JStage/control.cpp @@ -37,7 +37,7 @@ bool JStudio_JStage::TCreateObject::create( eObject = JStage::OBJECT_FOG; break; default: - return NULL; + return false; } JUT_ASSERT(99, pfnCreateObject!=NULL); JUT_ASSERT(100, eObject!=JStage::OBJECT_UNDEFINED); diff --git a/libs/JSystem/src/JUtility/JUTConsole.cpp b/libs/JSystem/src/JUtility/JUTConsole.cpp index 5f92398400..ff2c4f932f 100644 --- a/libs/JSystem/src/JUtility/JUTConsole.cpp +++ b/libs/JSystem/src/JUtility/JUTConsole.cpp @@ -180,7 +180,7 @@ void JUTConsole::doDraw(JUTConsole::EConsoleType consoleType) const { mFont->drawString_scale((int)f31, sp94, mFontSizeX, mFontSizeY, mVisible ? "[ON]" : "[OFF]", TRUE); f31 += (int)(mFontSizeX * 6.0f); - if (this == NULL) // ???? + if (IS_REF_NULL(*this)) // ???? { mFont->setCharColor(JUtility::TColor(0xff, 0xff, 0x64, 0xff)); mFont->drawString_scale((int)(f31 - mFontSizeX), mFontSizeX, mFontSizeY, sp94, diff --git a/libs/JSystem/src/JUtility/JUTException.cpp b/libs/JSystem/src/JUtility/JUTException.cpp index 6fe1078c4a..8666700d1c 100644 --- a/libs/JSystem/src/JUtility/JUTException.cpp +++ b/libs/JSystem/src/JUtility/JUTException.cpp @@ -947,7 +947,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio dst--; i--; } - (void)*src; // needed to match debug + UNUSED(*src); // needed to match debug *dst = 0; if (print) { if (begin_with_newline) { |
