From 4e9e18df827fbc80fd25e34f87fd9f2f45cd8674 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Tue, 17 Oct 2023 19:54:07 -0400
Subject: [PATCH] Clear unused-but-set-variable warnings

---
 src/blua/liolib.c       | 2 --
 src/d_netfil.c          | 3 ---
 src/hardware/hw_model.c | 3 +++
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/blua/liolib.c b/src/blua/liolib.c
index d1d6f4695..2d69f45cd 100644
--- a/src/blua/liolib.c
+++ b/src/blua/liolib.c
@@ -445,7 +445,6 @@ static int io_readline (lua_State *L) {
 static int g_write (lua_State *L, FILE *f, int arg) {
   int nargs = lua_gettop(L) - 1;
   int status = 1;
-  size_t count;
   for (; nargs--; arg++) {
     if (lua_type(L, arg) == LUA_TNUMBER) {
       /* optimization: could be done exactly as for strings */
@@ -455,7 +454,6 @@ static int g_write (lua_State *L, FILE *f, int arg) {
     else {
       size_t l;
       const char *s = luaL_checklstring(L, arg, &l);
-	  count += l;
 	  if (ftell(f) + l > FILELIMIT)
 	  {
 		luaL_error(L,"write limit bypassed in file. Changes have been discarded.");
diff --git a/src/d_netfil.c b/src/d_netfil.c
index 881b7b5b2..292fd0262 100644
--- a/src/d_netfil.c
+++ b/src/d_netfil.c
@@ -489,7 +489,6 @@ INT32 CL_CheckFiles(void)
 {
 	INT32 i, j;
 	char wadfilename[MAX_WADPATH];
-	size_t packetsize = 0;
 	size_t filestoload = 0;
 	boolean downloadrequired = false;
 
@@ -561,8 +560,6 @@ INT32 CL_CheckFiles(void)
 			}
 		}
 
-		packetsize += nameonlylength(fileneeded[i].filename) + 22;
-
 		fileneeded[i].status = findfile(fileneeded[i].filename, fileneeded[i].md5sum, true);
 		CONS_Debug(DBG_NETPLAY, "found %d\n", fileneeded[i].status);
 		return 4;
diff --git a/src/hardware/hw_model.c b/src/hardware/hw_model.c
index 2c36f9744..e77cf43ef 100644
--- a/src/hardware/hw_model.c
+++ b/src/hardware/hw_model.c
@@ -519,6 +519,9 @@ void GeneratePolygonNormals(model_t *model, int ztag)
 
 			for (k = 0; k < mesh->numTriangles; k++)
 			{
+				/// TODO: normalize vectors
+				(void)vertices;
+				(void)polyNormals;
 //				Vector::Normal(vertices, polyNormals);
 				vertices += 3 * 3;
 				polyNormals++;
-- 
GitLab