shithub: choc

Download patch

ref: a7cd250da15ee76d0d6cf485a4488b40703982e8
parent: 529ad8fd4d3313a2d60dff0c513b621b7219c94f
parent: db16605af019515128abbc2874caaaad7a55c356
author: Turo Lamminen <turol@users.noreply.github.com>
date: Wed Apr 27 16:13:03 EDT 2022

Merge pull request #1460 from turol/fix-warnings

Fix warnings

--- a/src/hexen/in_lude.c
+++ b/src/hexen/in_lude.c
@@ -167,7 +167,6 @@
     int j;
     int oldCluster;
     signed int slaughterfrags;
-    int posnum;
     int slaughtercount;
     int playercount;
     const char *msgLumpName;
@@ -205,7 +204,6 @@
         gametype = DEATHMATCH;
         slaughterboy = 0;
         slaughterfrags = -9999;
-        posnum = 0;
         playercount = 0;
         slaughtercount = 0;
         for (i = 0; i < maxplayers; i++)
@@ -221,7 +219,6 @@
                         totalFrags[i] += players[i].frags[j];
                     }
                 }
-                posnum++;
             }
             if (totalFrags[i] > slaughterfrags)
             {
--- a/src/strife/hu_stuff.c
+++ b/src/strife/hu_stuff.c
@@ -534,13 +534,8 @@
     static boolean      altdown = false;
     unsigned char       c;
     int                 i;
-    int                 numplayers;
     
     static int          num_nobrainers = 0;
-
-    numplayers = 0;
-    for (i=0 ; i<MAXPLAYERS ; i++)
-        numplayers += playeringame[i];
 
     if (ev->data1 == KEY_RSHIFT)
     {
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -555,12 +555,12 @@
 #endif
 
     retval = system(cmd);
-    free(cmd);
     if (retval != 0)
     {
         fprintf(stderr, "TXT_OpenURL: error executing '%s'; return code %d\n",
             cmd, retval);
     }
+    free(cmd);
 }
 
 #endif /* #ifndef _WIN32 */