From a07ec61d666522ef022bf490a2b95b43e081884b Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Wed, 11 Feb 2026 00:14:18 -0800 Subject: [PATCH] fix compiler warnings (#3094) --- include/d/actor/d_a_npc.h | 2 +- src/JSystem/J2DGraph/J2DPicture.cpp | 3 +-- src/JSystem/J3DU/J3DUFur.cpp | 6 +----- src/JSystem/J3DU/J3DUMotion.cpp | 4 +--- src/JSystem/J3DU/J3DUShadow.cpp | 4 +--- src/JSystem/JAudio2/JAUSoundObject.cpp | 4 +--- src/d/actor/d_a_npc.cpp | 2 +- src/d/d_drawlist.cpp | 6 +----- src/d/d_lib.cpp | 3 +-- src/d/d_map_path.cpp | 2 ++ 10 files changed, 11 insertions(+), 25 deletions(-) diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h index 6ea1e22a94..9dbc9f8d5f 100644 --- a/include/d/actor/d_a_npc.h +++ b/include/d/actor/d_a_npc.h @@ -169,7 +169,7 @@ public: int chkPassed1(cXyz, int); int chkPassed2(cXyz, cXyz*, int, int); #if DEBUG - int drawDbgInfo(f32, int); + void drawDbgInfo(f32, int); #endif daNpcT_Path_c() { diff --git a/src/JSystem/J2DGraph/J2DPicture.cpp b/src/JSystem/J2DGraph/J2DPicture.cpp index efeaca2ebf..65ce621e40 100644 --- a/src/JSystem/J2DGraph/J2DPicture.cpp +++ b/src/JSystem/J2DGraph/J2DPicture.cpp @@ -471,8 +471,7 @@ const ResTIMG* J2DPicture::changeTexture(char const* resName, u8 param_1) { return changeTexture((ResTIMG*)J2DScreen::getNameResource(resName), param_1); } -static bool dummy_weak_order(JUTTexture* tex) { - J2DPicture* picture; +static bool dummy_weak_order(J2DPicture* picture, JUTTexture* tex) { return picture->append(tex, 1.0f); } diff --git a/src/JSystem/J3DU/J3DUFur.cpp b/src/JSystem/J3DU/J3DUFur.cpp index 8920ff0517..d8a2f0b139 100644 --- a/src/JSystem/J3DU/J3DUFur.cpp +++ b/src/JSystem/J3DU/J3DUFur.cpp @@ -6,22 +6,18 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphBase/J3DVertex.h" -static void dummy() { - J3DShape* shape; +static void dummy(J3DShape* shape, J3DVertexBuffer* vtxBuf, J3DModel* model, J3DModelData* modelData) { J3DMaterial* material = shape->getMaterial(); J3DJoint* joint = material->getJoint(); - J3DVertexBuffer* vtxBuf; vtxBuf->swapTransformedVtxPos(); J3DVertexData* vtxData = vtxBuf->getVertexData(); vtxBuf->getTransformedVtxPos(0); vtxBuf->getCurrentVtxNrm(); vtxBuf->setCurrentVtxPos(NULL); - J3DModel* model; model->getVertexBuffer(); - J3DModelData* modelData; vtxData->getNrmNum(); modelData->getNrmNum(); vtxData->getVtxNum(); diff --git a/src/JSystem/J3DU/J3DUMotion.cpp b/src/JSystem/J3DU/J3DUMotion.cpp index b8e7096c91..fc98c856f1 100644 --- a/src/JSystem/J3DU/J3DUMotion.cpp +++ b/src/JSystem/J3DU/J3DUMotion.cpp @@ -6,9 +6,7 @@ #include "JSystem/J3DGraphLoader/J3DModelLoader.h" #include "JSystem/JMath/JMath.h" -static void dummy() { - J3DMtxCalcJ3DSysInitSoftimage* img; - Vec* vec; +static void dummy(J3DMtxCalcJ3DSysInitSoftimage* img, Vec* vec) { Mtx mtx; img->init(*vec, mtx); checkScaleOne(*vec); diff --git a/src/JSystem/J3DU/J3DUShadow.cpp b/src/JSystem/J3DU/J3DUShadow.cpp index 5a44bea051..78c9a69311 100644 --- a/src/JSystem/J3DU/J3DUShadow.cpp +++ b/src/JSystem/J3DU/J3DUShadow.cpp @@ -6,14 +6,12 @@ #include "JSystem/JMath/JMath.h" #include "JSystem/JUtility/JUTTexture.h" -void dummy() { +void J3DUShadow_dummy(JUTTexture* tex, JGeometry::TVec3* vec) { JMAAbs(0.0f); JMathInlineVEC::C_VECDotProduct(NULL, NULL); - JGeometry::TVec3* vec; vec->dot(*vec); vec->length(); - JUTTexture* tex; tex->getCaptureFlag(); tex->getFormat(); JMath::fastSqrt(0.0f); diff --git a/src/JSystem/JAudio2/JAUSoundObject.cpp b/src/JSystem/JAudio2/JAUSoundObject.cpp index 0a630c8ca2..e22fa687f8 100644 --- a/src/JSystem/JAudio2/JAUSoundObject.cpp +++ b/src/JSystem/JAudio2/JAUSoundObject.cpp @@ -4,8 +4,6 @@ #include "JSystem/JGeometry.h" -static void dummy() { - JGeometry::TVec3* vec_1; - JGeometry::TVec3* vec_2; +static void dummy(JGeometry::TVec3* vec_1, JGeometry::TVec3* vec_2) { *vec_1 = *vec_2; } diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index c9fc16906b..d407d42e7c 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -752,7 +752,7 @@ int daNpcT_Path_c::chkPassed2(cXyz i_pnt, cXyz* param_2, int i_num, int param_4) } #if DEBUG -int daNpcT_Path_c::drawDbgInfo(f32 param_0, int param_1) { +void daNpcT_Path_c::drawDbgInfo(f32 param_0, int param_1) { GXColor green = {0x80, 0xff, 0x80, 0xff}; GXColor blue = {0x80, 0x80, 0xff, 0xff}; GXColor red = {0xff, 0x80, 0x80, 0xff}; diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp index df96ec7da8..b79a594eff 100644 --- a/src/d/d_drawlist.cpp +++ b/src/d/d_drawlist.cpp @@ -874,11 +874,7 @@ void dDlst_blo_c::draw() { } // stand-in for a function that pulls in a bunch of inline functions but was presumably stripped -static void dummy_misc() { - J2DScreen* screen; - J2DPane* pane; - J2DPicture* picture; - J2DAnmBase* anmBase; +static void dummy_misc(J2DAnmBase* anmBase, J2DPicture* picture, J2DPane* pane, J2DScreen* screen) { delete anmBase; picture->setBlack(JUtility::TColor(0, 0, 0, 0)); picture->setWhite(JUtility::TColor(0, 0, 0, 0)); diff --git a/src/d/d_lib.cpp b/src/d/d_lib.cpp index 5456c7dc9d..8f3597a55b 100644 --- a/src/d/d_lib.cpp +++ b/src/d/d_lib.cpp @@ -16,8 +16,7 @@ #include "f_op/f_op_actor.h" #include "m_Do/m_Do_controller_pad.h" -static void dummy1(mDoExt_btkAnm* btk) { - cXyz pos; +static void dummy1(mDoExt_btkAnm* btk, cXyz& pos) { GXColor color; OS_REPORT("d_lib.cpp"); OS_REPORT("brk != 0"); diff --git a/src/d/d_map_path.cpp b/src/d/d_map_path.cpp index ca95a043fd..7e39f4a685 100644 --- a/src/d/d_map_path.cpp +++ b/src/d/d_map_path.cpp @@ -94,10 +94,12 @@ void dMpath_HIO_n::hioList_c::update(JORMContext* mctx) { u32 dMpath_HIO_n::hioList_c::addString(char* param_1, u32 param_2, u32 param_3) const { // DEBUG NONMATCHING + return param_2; } u32 dMpath_HIO_n::hioList_c::addStringBinary(char* param_1, u32 param_2, u32 param_3) const { // DEBUG NONMATCHING + return param_2; } BOOL dMpath_HIO_file_base_c::writeHostioTextFile(const char* param_1) {