Skip to content

Commit 65d9e49

Browse files
j4reportingvsonnier
authored andcommitted
fix clang compile warning with -DNDEBUG
FAILED: [code=1] vkquake.p/Quake_pr_edict.c.o clang -Ivkquake.p -I. -I.. -I../Quake/mimalloc -I/usr/include/SDL2 -I/usr/include/opus -fdiagnostics-color=always -DNDEBUG -include-pch vkquake.p/quakedef.h.pch -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu11 -O3 -D_GNU_SOURCE -D_GNU_SOURCE=1 -D_REENTRANT -pthread -Wall -Wno-trigraphs -Werror -std=gnu11 -DUSE_CODEC_WAVE -DUSE_CODEC_MP3 -DUSE_CODEC_FLAC -DUSE_CODEC_VORBIS -DUSE_CODEC_OPUS -MD -MQ vkquake.p/Quake_pr_edict.c.o -MF vkquake.p/Quake_pr_edict.c.o.d -o vkquake.p/Quake_pr_edict.c.o -c ../Quake/pr_edict.c ../Quake/pr_edict.c:886:6: error: variable 'free_edicts_count' set but not used [-Werror,-Wunused-but-set-variable] 886 | int free_edicts_count = 0; | ^ ../Quake/pr_edict.c:887:6: error: variable 'free_list_count' set but not used [-Werror,-Wunused-but-set-variable] 887 | int free_list_count = 0; | ^ 2 errors generated.
1 parent 5be59bf commit 65d9e49

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Quake/pr_edict.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,12 +883,12 @@ For debugging, prints all the entities in the current server
883883
*/
884884
void ED_PrintEdicts (void)
885885
{
886-
int free_edicts_count = 0;
887-
int free_list_count = 0;
888-
889886
if (!sv.active)
890887
return;
891888

889+
int free_edicts_count = 0;
890+
int free_list_count = 0;
891+
892892
PR_SwitchQCVM (&sv.qcvm);
893893

894894
// display the non-free ones first

0 commit comments

Comments
 (0)