Skip to content

Commit

Permalink
Zero-initialize arrays directly to silence "might not be terminated" …
Browse files Browse the repository at this point in the history
…warning

#91
  • Loading branch information
SamVanheer committed Nov 30, 2021
1 parent a8824ba commit 6537f69
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dlls/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,8 @@ void SENTENCEG_Stop(edict_t* entity, int isentenceg, int ipick)

void SENTENCEG_Init()
{
char buffer[512];
char szgroup[64];
char buffer[512]{};
char szgroup[64]{};
int i, j;
int isentencegs;

Expand All @@ -1314,8 +1314,6 @@ void SENTENCEG_Init()
gcallsentences = 0;

memset(rgsentenceg, 0, CSENTENCEG_MAX * sizeof(SENTENCEG));
memset(buffer, 0, 512);
memset(szgroup, 0, 64);
isentencegs = -1;


Expand Down

0 comments on commit 6537f69

Please sign in to comment.