From 45067e00a5113ab4c8b70836602e4247670bfd77 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 4 May 2026 08:04:00 +0200 Subject: [PATCH] fix compiler warnings + "support" gcc16 --- src/Makefile.d/detect.mk | 3 ++- src/hardware/hw_md3load.c | 7 +++---- src/y_inter.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index 0816c5a03..766b497c3 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -64,6 +64,7 @@ endif # This must have high to low order. gcc_versions:=\ + 161 160 16\ 152 151 150 15\ 142 141 140 14\ 133 132 131 130 13\ @@ -77,7 +78,7 @@ gcc_versions:=\ 55 54 53 52 51 50\ 49 48 47 46 45 44 43 42 41 40 -latest_gcc_version:=15.2 +latest_gcc_version:=16.1 # Automatically set version flag, but not if one was # manually set. And don't bother if this is a clean only diff --git a/src/hardware/hw_md3load.c b/src/hardware/hw_md3load.c index b536c7e73..06aa6507e 100644 --- a/src/hardware/hw_md3load.c +++ b/src/hardware/hw_md3load.c @@ -154,7 +154,7 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat) char *buffer; int surfEnd; int i, t; - int matCount; + //int matCount; FILE *f; if (!latlnginit) @@ -227,7 +227,7 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat) retModel->meshes = (mesh_t*)Z_Calloc(sizeof(mesh_t)*retModel->numMeshes, ztag, NULL); - matCount = 0; + //matCount = 0; for (i = 0, surfEnd = 0; i < mdh->numSurfaces; i++) { int j; @@ -237,7 +237,7 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat) mdShader = (md3Shader*)((char*)mdS + mdS->offsetShaders); - for (j = 0; j < mdS->numShaders; j++, matCount++) + for (j = 0; j < mdS->numShaders; j++ /*, matCount++*/) { size_t len = strlen(mdShader[j].name); mdShader[j].name[len-1] = 'z'; @@ -503,7 +503,6 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat) } }*/ - free(buffer); return retModel; diff --git a/src/y_inter.c b/src/y_inter.c index 684797999..5fbd4d86e 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -330,7 +330,7 @@ static void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 x, INT32 hilicol) V_DrawCenteredString(x+6, y, 0, va("%d", standings->pos[i])); // localskins are amazing - if (standings->color[i] != SKINCOLOR_NONE) + if (*standings->color[i] != SKINCOLOR_NONE) { UINT8 *colormap = R_GetTranslationColormap(*standings->character[i], *standings->color[i], GTC_CACHE); INT32 skinnum = (player->localskin ? (player->localskin - 1) : *standings->character[i]);