From 1bef952ff61a6dd1945c7887c1babd94efe95f72 Mon Sep 17 00:00:00 2001 From: Tharo Date: Thu, 24 Sep 2026 05:29:19 +0100 Subject: Unused variable/parameter cleanup (#1321) * UNUSED attribute for variables and parameters in static segments and for all stack padding variables * No more unused variable warnings * Make pad variable names consistent * Small cleanup * Macro-ify stack padding * Use stack padding for more variables not previously named pad * Format * Check unused parameter on gamestate overlays and pause menu Co-authored-by: Dragorn421 * Merge 2x u8 stack pads into 1x s16 stack pad in en_ik * Remove UNUSED from function prototypes * Suggested changes Co-authored-by: Dragorn421 * More unused variables * Fix merge, updated for new versions * Format * questionable UNUSED and STACK_PAD more usage * format * format * one more STACK_PADS in z_kaleido_map.c --------- Co-authored-by: Dragorn421 --- src/code/sys_math3d.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/code/sys_math3d.c') diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index 0287a64e2..70fe669a8 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -1,6 +1,7 @@ #include "sys_math3d.h" #include "printf.h" +#include "stack_pad.h" #include "terminal.h" #include "translation.h" #include "ultra64.h" @@ -160,7 +161,7 @@ void Math3D_FindPointOnPlaneIntersect(f32 planeAAxis1Norm, f32 planeAAxis2Norm, */ s32 Math3D_PlaneVsPlaneNewLine(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, InfiniteLine* intersect) { - char pad[4]; + STACK_PAD(s32); Vec3f planeANormal; Vec3f planeBNormal; f32 dirX; @@ -1641,7 +1642,7 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V f32 fracB; f32 fracBase; f32 zero = 0.0f; - f32 pad; + STACK_PAD(s32); f32 cylRadiusSq; f32 radSqDiff; f32 distCent2; @@ -1833,7 +1834,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) { Vec3f cylIntersectCenter; Vec3f midpointv0v1; Vec3f diffMidpointIntersect; - s32 pad; + STACK_PAD(s32); cylBottom = (f32)cyl->pos.y + cyl->yShift; cylTop = cyl->height + cylBottom; -- cgit v1.2.3