SW: Fix -Wcast-qual in grpscan

git-svn-id: https://svn.eduke32.com/eduke32@7528 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-04-08 06:27:55 +00:00 committed by Christoph Oelckers
parent c7a209f690
commit 963624735f
2 changed files with 14 additions and 7 deletions

View File

@ -30,11 +30,11 @@
#include "grpscan.h"
grpfile grpfiles[numgrpfiles] =
internalgrpfile grpfiles[numgrpfiles] =
{
{ "Registered Version", 0x7545319Fu, 47536148, NULL },
{ "Shareware Version", 0x08A7FA1Fu, 26056769, NULL },
{ "Wanton Destruction (Addon)", 0xA9AAA7B7u, 48698128, NULL },
{ "Registered Version", 0x7545319Fu, 47536148 },
{ "Shareware Version", 0x08A7FA1Fu, 26056769 },
{ "Wanton Destruction (Addon)", 0xA9AAA7B7u, 48698128 },
};
grpfile *foundgrps = NULL;
@ -204,7 +204,7 @@ void FreeGroups(void)
while (foundgrps)
{
fg = foundgrps->next;
free((char *)foundgrps->name);
free(foundgrps->name);
free(foundgrps);
foundgrps = fg;
}

View File

@ -26,15 +26,22 @@
// List of internally-known GRP files
#define numgrpfiles 3
struct grpfile
struct internalgrpfile
{
const char *name;
unsigned int crcval;
int size;
};
struct grpfile
{
char *name;
unsigned int crcval;
int size;
struct grpfile *next;
};
extern grpfile grpfiles[numgrpfiles], *foundgrps;
extern internalgrpfile grpfiles[numgrpfiles];
extern grpfile *foundgrps;
int ScanGroups(void);
void FreeGroups(void);