Skip to content

Commit

Permalink
warning cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Nov 2, 2024
1 parent e9f82ff commit 3eac0a1
Show file tree
Hide file tree
Showing 57 changed files with 148 additions and 88 deletions.
2 changes: 1 addition & 1 deletion include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef J3DMODELLOADERCALCSIZE_H
#define J3DMODELLOADERCALCSIZE_H

#include "JSystem/J3DGraphLoader/J3DModelLoader.h"
#include "JSystem/J3DGraphLoader/J3DModelLoader.h" // IWYU pragma: export

#endif /* J3DMODELLOADERCALCSIZE_H */
2 changes: 1 addition & 1 deletion include/JSystem/JStudio/JStudio_JAudio/object-sound.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_SOUND_H
#define OBJECT_SOUND_H

#include "JSystem/JStudio/JStudio_JAudio/control.h"
#include "JSystem/JStudio/JStudio_JAudio/control.h" // IWYU pragma: export

#endif /* OBJECT_SOUND_H */
2 changes: 1 addition & 1 deletion include/JSystem/JStudio/JStudio_JMessage/object-message.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_MESSAGE_H
#define OBJECT_MESSAGE_H

#include "JSystem/JStudio/JStudio_JMessage/control.h"
#include "JSystem/JStudio/JStudio_JMessage/control.h" // IWYU pragma: export

#endif /* OBJECT_MESSAGE_H */
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_PARTICLE_H
#define OBJECT_PARTICLE_H

#include "JSystem/JStudio/JStudio_JParticle/control.h"
#include "JSystem/JStudio/JStudio_JParticle/control.h" // IWYU pragma: export

#endif /* OBJECT_PARTICLE_H */
2 changes: 1 addition & 1 deletion include/JSystem/JStudio/JStudio_JStage/object-actor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_ACTOR_H
#define OBJECT_ACTOR_H

#include "JSystem/JStudio/JStudio_JStage/control.h"
#include "JSystem/JStudio/JStudio_JStage/control.h" // IWYU pragma: export

#endif /* OBJECT_ACTOR_H */
2 changes: 1 addition & 1 deletion include/JSystem/JStudio/JStudio_JStage/object-camera.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_CAMERA_H
#define OBJECT_CAMERA_H

#include "JSystem/JStudio/JStudio_JStage/control.h"
#include "JSystem/JStudio/JStudio_JStage/control.h" // IWYU pragma: export

#endif /* OBJECT_CAMERA_H */
2 changes: 1 addition & 1 deletion include/JSystem/JStudio/JStudio_JStage/object.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef OBJECT_H
#define OBJECT_H

#include "JSystem/JStudio/JStudio_JStage/control.h"
#include "JSystem/JStudio/JStudio_JStage/control.h" // IWYU pragma: export

#endif /* OBJECT_H */
1 change: 1 addition & 0 deletions include/dolphin/os/OSError.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ typedef enum {
EXCEPTION_THERMAL_INTERRUPT,
EXCEPTION_MEMORY_PROTECTION,
EXCEPTION_FLOATING_POINT_EXCEPTION,
EXCEPTION_MAX,
} OSException;

typedef u8 __OSException;
Expand Down
2 changes: 1 addition & 1 deletion include/dolphin/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef unsigned int uint;
(((u32)ptr[offset] << 24) | ((u32)ptr[offset + 1] << 16) | ((u32)ptr[offset + 2] << 8) | \
(u32)ptr[offset + 3]);

#include "stddef.h"
#include "stddef.h" // IWYU pragma: export

#define INT32_MAX (0x7fffffff)
#define UINT32_MAX (0xffffffff)
Expand Down
2 changes: 2 additions & 0 deletions src/JSystem/J3DGraphAnimator/J3DCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ int J3DSkinDeform::initMtxIndexArray(J3DModelData* modelData) {
OSReport(" Invlid Data : CPU Pipeline process GX_INDEX16 Data Only\n");
}
break;
default:
break;
}

vtxSize += size[desc->type];
Expand Down
2 changes: 2 additions & 0 deletions src/JSystem/J3DGraphAnimator/J3DModelData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ bool J3DModelData::isDeformablePositionFormat() const {
if (vtxAttr->mCompType == GX_F32 && vtxAttr->mCompCnt == GX_POS_XYZ)
return true;
break;
default:
break;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/JSystem/J3DGraphBase/J3DShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "JSystem/J3DGraphBase/J3DVertex.h"
#include "dolphin/gd/GDBase.h"
#include "dolphin/gd/GDGeometry.h"
#include "dolphin/os/OS.h"
#include "dolphin/types.h"

extern void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList *, bool);
Expand Down
3 changes: 2 additions & 1 deletion src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* i_data, u32 i_flag
break;
case 'MAT2':
break;
case 'MAT3':
case 'MAT3': {
u32 matFlags = 0x50100000;
matFlags |= (u32)i_flags & 0x03000000;
mpMaterialBlock = (const J3DMaterialBlock*)block;
Expand All @@ -137,6 +137,7 @@ u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* i_data, u32 i_flag
size += calcSizePatchedMaterial((const J3DMaterialBlock*)block, matFlags);
}
break;
}
case 'EVP1':
break;
case 'DRW1':
Expand Down
2 changes: 1 addition & 1 deletion src/JSystem/JAudio/JAISound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ f32 JAISound::setDistanceVolumeCommon(f32 param_1, u8 param_2) {
var1 -= JAIGlobalParameter::maxVolumeDistance;
f32 var2 = param_1 - JAIGlobalParameter::maxVolumeDistance;
if (param_2 > 3) {
var2 /= 1 << (param_2 & 3) + 1;
var2 /= 1 << ((param_2 & 3) + 1);
} else if (param_2 != 0) {
var2 *= 1 << (param_2 & 3);
}
Expand Down
2 changes: 1 addition & 1 deletion src/JSystem/JAudio/JAIStreamMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void JAInter::StreamLib::setDecodedBufferBlocks(u32 param_1) {
/* 8029D424-8029D464 .text LoopInit__Q27JAInter9StreamLibFv */
void JAInter::StreamLib::LoopInit() {
loop_start_flag = true;
u32 var1 = (header.field_0x14 - (header.field_0x14 & 0x7F) >> 4) * 18 + 32;
u32 var1 = ((header.field_0x14 - (header.field_0x14 & 0x7F)) >> 4) * 18 + 32;
adpcm_loadpoint = var1;
var1 -= 32;
adpcm_remain = header.field_0x0 - var1;
Expand Down
2 changes: 1 addition & 1 deletion src/JSystem/JAudio/JASAudioThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void JASystem::TAudioThread::start(JKRSolidHeap* heap, u32 aramSize, u32 flag) {
Dvd::resumeThread();
Kernel::stackInit((u64*)saAudioStack, 0x200);
if ((flag & 2)) {
OSCreateThread(&sAudioThread, audioproc, NULL, &saAudioStack[sizeof(saAudioStack)], sizeof(saAudioStack), sDSPPrio, 1);
OSCreateThread(&sAudioThread, (void*)audioproc, NULL, &saAudioStack[sizeof(saAudioStack)], sizeof(saAudioStack), sDSPPrio, 1);
OSResumeThread(&sAudioThread);
}
}
6 changes: 4 additions & 2 deletions src/JSystem/JAudio/JASHardStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,16 @@ void JASystem::HardStream::main() {
}
strCtrl.field_0xb = 4;
return;
case 4:
case 4: {
u8 currentVol = strCtrl.getCurVol();
AISetStreamVolLeft(currentVol);
AISetStreamVolRight(currentVol);
DVDGetStreamPlayAddrAsync(&get_addr_cmd[cur_addr_cmd], getAddrCallback);
cur_addr_cmd++;
cur_addr_cmd %= 16;
return;
case 5:
}
case 5: {
TPlayList* list = strCtrl.getList();
if (!list) {
if (strCtrl.field_0x8 != 2) {
Expand Down Expand Up @@ -161,6 +162,7 @@ void JASystem::HardStream::main() {
}
strCtrl.field_0xb = 4;
return;
}
case 6:
AISetStreamVolLeft(0);
AISetStreamVolRight(0);
Expand Down
2 changes: 2 additions & 0 deletions src/JSystem/JKernel/JKRAramStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ void* JKRAramStream::run() {
case JKRAramStreamCommand::WRITE:
writeToAram(command);
break;
default:
break;
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/JSystem/JKernel/JKRDvdArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ static void dummy() {

/* 802BAD98-802BB024 .text open__13JKRDvdArchiveFl */
bool JKRDvdArchive::open(s32 entryNum) {
int alignment;
u8 useCompression;
SDIFileEntry* fileEntry;

mArcInfoBlock = NULL;
mDataOffset = NULL;
mNodes = NULL;
Expand All @@ -85,7 +89,7 @@ bool JKRDvdArchive::open(s32 entryNum) {
JKRDvdToMainRam(entryNum, (u8*)arcHeader, EXPAND_SWITCH_UNKNOWN1, sizeof(SArcHeader), NULL,
JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0, &mCompression);

int alignment = mMountDirection == MOUNT_DIRECTION_HEAD ? 0x20 : -0x20;
alignment = mMountDirection == MOUNT_DIRECTION_HEAD ? 0x20 : -0x20;

mArcInfoBlock = (SArcDataInfo*)JKRAllocFromHeap(mHeap, arcHeader->file_data_offset, alignment);
if (!mArcInfoBlock) {
Expand All @@ -102,8 +106,8 @@ bool JKRDvdArchive::open(s32 entryNum) {
mStringTable = (char*)((int)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset);
mExpandedSize = NULL;

u8 useCompression = 0;
SDIFileEntry* fileEntry = mFiles;
useCompression = 0;
fileEntry = mFiles;
for (u32 i = 0; i < mArcInfoBlock->num_file_entries; fileEntry++, i++) {
if (fileEntry->isUnknownFlag1()) {
useCompression |= fileEntry->getCompressFlag();
Expand Down
3 changes: 2 additions & 1 deletion src/JSystem/JMessage/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,11 @@ void TSequenceProcessor::do_systemTagCode_(u16 code, const void* data, u32 size)
case 2:
case 3:
break;
case 6:
case 6: {
u32 target = JGadget::binary::TParseValue<u32, JGadget::binary::TParseValue_endian_big_>::parse(data);
on_jump_register(process_jump_, target);
break;
}
case 4:
case 5:
default:
Expand Down
3 changes: 2 additions & 1 deletion src/JSystem/JMessage/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ bool JMessage::TParse::parseBlock_next(const void** ppData, u32* pOutSize, u32 f
case 'INF1':
mResource->setData_block_info(pHeader);
break;
case 'DAT1':
case 'DAT1': {
mResource->setData_block_messageData((char*)&pHeader[1]);
TResource* res = mResourceContainer->Get_groupID(mResource->mInfo.get_groupID());
if (res != mResource && !!(flag & 0x80)) {
mResourceContainer->Erase_destroy(res);
}
break;
}
case 'STR1':
mResource->setData_block_stringAttribute((char*)&pHeader[1]);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/JSystem/JParticle/JPADraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ void JPADraw::setParticleClipBoard() {
cb.mTexCoordPt[3].y = tilingY;

if (!dc.pbsp->textureIsEmpty() && !dc.pbsp->isEnableTextureAnm())
mTexIdx = dc.pTexIdx[dc.pbsp->getTextureIndex()], GX_TEXMAP0;
mTexIdx = dc.pTexIdx[dc.pbsp->getTextureIndex()];

cb.mDirTypeFunc = NULL;
cb.mRotTypeFunc = NULL;
Expand Down
1 change: 0 additions & 1 deletion src/JSystem/JStudio/JStudio_JAudio/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

#include "JSystem/JStudio/JStudio_JAudio/control.h"
#include "dolphin/types.h"

namespace JStudio_JAudio {

Expand Down
11 changes: 9 additions & 2 deletions src/JSystem/JStudio/JStudio_JAudio/object-sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void TAdaptor_sound::adaptor_do_update(const JStudio::TObject* object, u32) {
/* 80278FB8-80279064 .text adaptor_do_SOUND__Q214JStudio_JAudio14TAdaptor_soundFQ37JStudio4data15TEOperationDataPCvUl */
void TAdaptor_sound::adaptor_do_SOUND(JStudio::data::TEOperationData op, const void* data, u32) {
switch (op) {
case JStudio::data::TEOD_Unknown_19:
case JStudio::data::TEOD_Unknown_19: {
u32 flags = *(s32*)data;
if (flags & 0xc0000000) {
if (mpSound) {
Expand All @@ -83,20 +83,27 @@ void TAdaptor_sound::adaptor_do_SOUND(JStudio::data::TEOperationData op, const v
} else {
mFlags = *(s32*)data;
}
break;
}
default:
break;
}
}

/* 80279064-8027908C .text adaptor_do_LOCATED__Q214JStudio_JAudio14TAdaptor_soundFQ37JStudio4data15TEOperationDataPCvUl */
void TAdaptor_sound::adaptor_do_LOCATED(JStudio::data::TEOperationData op, const void* data, u32 flag) {
switch (op) {
case JStudio::data::TEOD_Unknown_02:
case JStudio::data::TEOD_Unknown_02: {
Vec* pos = *(Vec**)data;
mPosition = NULL;
if (!pos)
return;
mPosition = &_F8;
break;
}
default:
break;
}
}

/* 8027908C-8027915C .text __cl__Q314JStudio_JAudio14TAdaptor_sound21TVVOOn_BEGIN_FADE_IN_CFfPQ27JStudio8TAdaptor */
Expand Down
1 change: 0 additions & 1 deletion src/JSystem/JStudio/JStudio_JMessage/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

#include "JSystem/JStudio/JStudio_JMessage/control.h"
#include "dolphin/types.h"

namespace JStudio_JMessage {

Expand Down
2 changes: 2 additions & 0 deletions src/JSystem/JStudio/JStudio_JMessage/object-message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ void JStudio_JMessage::TAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOpe
case JStudio::data::TEOD_Unknown_19:
mControl->setMessageCode(*(u32*)param_2);
break;
default:
break;
}
}
1 change: 0 additions & 1 deletion src/JSystem/JStudio/JStudio_JParticle/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

#include "JSystem/JStudio/JStudio_JParticle/control.h"
#include "dolphin/types.h"

namespace JStudio_JParticle {

Expand Down
8 changes: 8 additions & 0 deletions src/JSystem/JStudio/JStudio_JParticle/object-particle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ void TAdaptor_particle::adaptor_do_PARTICLE(JStudio::data::TEOperationData opera
case JStudio::data::TEOD_Unknown_19:
_188 = *(int*)r5;
break;
default:
break;
}
}

Expand All @@ -99,6 +101,8 @@ void TAdaptor_particle::adaptor_do_PARENT(JStudio::data::TEOperationData operati
}
}
break;
default:
break;
}
}

Expand All @@ -116,6 +120,8 @@ void TAdaptor_particle::adaptor_do_PARENT_NODE(JStudio::data::TEOperationData op
case JStudio::data::TEOD_Unknown_19:
_1A0 = *(u32*)param_2;
break;
default:
break;
}
}

Expand All @@ -125,6 +131,8 @@ void TAdaptor_particle::adaptor_do_PARENT_ENABLE(JStudio::data::TEOperationData
case JStudio::data::TEOD_Unknown_02:
_1A4 = *(u32*)param_2;
break;
default:
break;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/JSystem/JStudio/JStudio_JStage/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

#include "JSystem/JStudio/JStudio_JStage/control.h"
#include "dolphin/types.h"

namespace JStudio_JStage {

Expand Down
Loading

0 comments on commit 3eac0a1

Please sign in to comment.