Fix a bunch of compiler warnings and document several more bugs (#3130)

This commit is contained in:
Max Roncace
2026-03-18 01:38:05 -04:00
committed by GitHub
parent 9f340b604b
commit 6694c1b281
109 changed files with 416 additions and 207 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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)++;
}
+1 -1
View File
@@ -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:
+3 -3
View File
@@ -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);
@@ -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);
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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) {