Skip to content

Commit

Permalink
Remove unused functions that cause "unreferenced formal parameter" wa…
Browse files Browse the repository at this point in the history
…rnings, comment out parameters that aren't used but useful or needed, remove parameters that aren't used at all

#138
  • Loading branch information
SamVanheer committed Mar 16, 2022
1 parent 0caf96a commit 73b69d1
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 38 deletions.
2 changes: 1 addition & 1 deletion utils/common/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int GetThreadWork (void)

void (*workfunction) (int);

void ThreadWorkerFunction (int threadnum)
void ThreadWorkerFunction(int /*threadnum*/)
{
int work;

Expand Down
2 changes: 1 addition & 1 deletion utils/light/light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int main (int argc, char **argv)
LoadBSPFile (source);
LoadEntities ();

MakeTnodes (&dmodels[0]);
MakeTnodes ();

LightWorld ();

Expand Down
2 changes: 1 addition & 1 deletion utils/light/light.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ qboolean TestLine (vec3_t start, vec3_t stop);
void LightFace (int surfnum);
void LightLeaf (dleaf_t *leaf);

void MakeTnodes (dmodel_t *bm);
void MakeTnodes ();

extern float scaledist;
extern float scalecos;
Expand Down
2 changes: 1 addition & 1 deletion utils/light/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ MakeTnodes
Loads the node structure out of a .bsp file to be used for light occlusion
=============
*/
void MakeTnodes (dmodel_t *bm)
void MakeTnodes ()
{
if (!numnodes)
Error ("Map has no nodes\n");
Expand Down
4 changes: 2 additions & 2 deletions utils/mdlviewer/mdlviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void pan(int x, int y)
//glutPostRedisplay();
}

void zoom(int x, int y)
void zoom(int x, int /*y*/)
{
transz += (x-ox)/20.;
ox = x;
Expand Down Expand Up @@ -233,7 +233,7 @@ void reshape(int w, int h)
}

/*ARGSUSED1*/
void key(unsigned char key, int x, int y)
void key(unsigned char key, int /*x*/, int /*y*/)
{
switch(key)
{
Expand Down
5 changes: 1 addition & 4 deletions utils/qbsp2/bsp5.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void SubdivideFaces (surface_t *surfhead);

surfchain_t *GatherNodeFaces (node_t *headnode);

void MakeFaceEdges (node_t *headnode);
void MakeFaceEdges ();
int GetEdge(vec3_t p1, vec3_t p2, face_t* f);

//=============================================================================
Expand Down Expand Up @@ -199,21 +199,18 @@ void FinishBSPFile (void);
extern vec3_t draw_mins, draw_maxs;

void Draw_ClearBounds (void);
void Draw_AddToBounds (vec3_t v);
void Draw_DrawFace (face_t *f);
void Draw_ClearWindow (void);
void Draw_SetRed (void);
void Draw_SetGrey (void);
void Draw_SetBlack (void);
void DrawPoint (vec3_t v);

void Draw_SetColor (int c);
void SetColor (int c);
void DrawPortal (portal_t *p);
void DrawLeaf (node_t *l, int color);

void DrawWinding (winding_t *w);
void DrawTri (vec3_t p1, vec3_t p2, vec3_t p3);

//=============================================================================

Expand Down
14 changes: 1 addition & 13 deletions utils/qbsp2/gldraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ void Draw_ClearBounds (void)
{
}

void Draw_AddToBounds (vec3_t v)
{
}

void Draw_DrawFace (face_t *f)
{
int i;
Expand Down Expand Up @@ -153,11 +149,7 @@ void Draw_SetBlack (void)
glColor3f (0,0,0);
}

void DrawPoint (vec3_t v)
{
}

void DrawLeaf (node_t *l, int color)
void DrawLeaf (node_t */*l*/, int /*color*/)
{
}

Expand All @@ -175,10 +167,6 @@ void DrawWinding (winding_t *w)
glFlush ();
}

void DrawTri (vec3_t p1, vec3_t p2, vec3_t p3)
{
}

void DrawPortal (portal_t *portal)
{
DrawWinding (portal->winding);
Expand Down
2 changes: 1 addition & 1 deletion utils/qbsp2/qbsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ qboolean ProcessModel (void)
// fix tjunctions
tjunc (nodes);

MakeFaceEdges (nodes);
MakeFaceEdges ();

// emit the faces for the bsp file
model->headnode[0] = numnodes;
Expand Down
2 changes: 1 addition & 1 deletion utils/qbsp2/surfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ void CheckEdges (void)
MakeFaceEdges
================
*/
void MakeFaceEdges (node_t *headnode)
void MakeFaceEdges ()
{
InitHash ();
c_tryedges = 0;
Expand Down
2 changes: 1 addition & 1 deletion utils/qcsg/qcsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Precedence is necesary to handle overlapping coplanar faces.
=================
*/
#define SPLIT_EPSILON 0.3
bface_t *ClipFace (brush_t *b, bface_t *f, bface_t **outside,
bface_t *ClipFace (brush_t */*b*/, bface_t *f, bface_t **outside,
int splitplane, qboolean precedence)
{
bface_t *front;
Expand Down
8 changes: 4 additions & 4 deletions utils/qrad/qrad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ winding_t *WindingFromFace (dface_t *f)
BaseLightForFace
=============
*/
void BaseLightForFace( dface_t *f, vec3_t light, vec3_t reflectivity )
void BaseLightForFace( dface_t *f, vec3_t light, vec3_t /*reflectivity*/ )
{
texinfo_t *tx;
miptex_t *mt;
Expand Down Expand Up @@ -684,7 +684,7 @@ MakeScales
*/
int total_transfer;

void MakeScales (int threadnum)
void MakeScales (int /*threadnum*/)
{
int i;
unsigned j;
Expand Down Expand Up @@ -951,7 +951,7 @@ Get light from other patches
Run multi-threaded
=============
*/
void GatherLight (int threadnum)
void GatherLight (int /*threadnum*/)
{
int j, k;
transfer_t *trans;
Expand Down Expand Up @@ -1198,7 +1198,7 @@ void RadWorld (void)

MakeBackplanes ();
MakeParents (0, -1);
MakeTnodes (&dmodels[0]);
MakeTnodes ();

// turn each face into a single patch
MakePatches ();
Expand Down
2 changes: 1 addition & 1 deletion utils/qrad/qrad.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ extern float gamma;
extern float indirect_sun;
extern float smoothing_threshold;

void MakeTnodes (dmodel_t *bm);
void MakeTnodes ();
void PairEdges (void);
qboolean IsIncremental(char *filename);
int SaveIncremental(char *filename);
Expand Down
2 changes: 1 addition & 1 deletion utils/qrad/trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MakeTnodes
Loads the node structure out of a .bsp file to be used for light occlusion
=============
*/
void MakeTnodes (dmodel_t *bm)
void MakeTnodes ()
{
// 32 byte align the structs
tnodes = reinterpret_cast<tnode_t*>(calloc( (numnodes+1), sizeof(tnode_t)));
Expand Down
2 changes: 1 addition & 1 deletion utils/qrad/vismat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ BuildVisLeafs
This is run by multiple threads
===========
*/
void BuildVisLeafs (int threadnum)
void BuildVisLeafs (int /*threadnum*/)
{
int i;
int lface, facenum, facenum2;
Expand Down
4 changes: 1 addition & 3 deletions utils/studiomdl/studiomdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@

static int force_powerof2_textures = 0;

void Sys_Error (char *error, ...) {};

void clip_rotations( vec3_t rot );

#define strcpyn( a, b ) strncpy( a, b, sizeof( a ) )
Expand Down Expand Up @@ -2449,7 +2447,7 @@ void Option_Animation ( char *name, s_animation_t *panim )
}


int Option_Deform ( s_sequence_t *psequence )
int Option_Deform ( s_sequence_t */*psequence*/ )
{
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion utils/visx2/flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void SimpleFlood (portal_t *srcportal, int leafnum, byte *portalsee, int *c_leaf
BasePortalVis
==============
*/
void BasePortalVis (int threadnum)
void BasePortalVis (int /*threadnum*/)
{
int i, j, k;
portal_t *tp, *p;
Expand Down
2 changes: 1 addition & 1 deletion utils/visx2/vis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ portal_t *GetNextPortal (void)
LeafThread
==============
*/
void LeafThread (int thread)
void LeafThread (int /*thread*/)
{
portal_t *p;

Expand Down

0 comments on commit 73b69d1

Please sign in to comment.