Fix mixed declarations and code warning

This commit is contained in:
toaster 2022-10-28 21:26:31 +01:00
parent b84d4a6bd2
commit 8d2d91a3bf

View file

@ -1143,6 +1143,8 @@ void D_SRB2Main(void)
{ {
const char *userhome = D_Home(); //Alam: path to home const char *userhome = D_Home(); //Alam: path to home
FILE *tmpfile;
char testfile[MAX_WADPATH];
if (!userhome) if (!userhome)
{ {
@ -1192,9 +1194,6 @@ void D_SRB2Main(void)
// If config isn't writable, tons of behavior will be broken. // If config isn't writable, tons of behavior will be broken.
// Fail loudly before things get confusing! // Fail loudly before things get confusing!
FILE *tmpfile;
char testfile[MAX_WADPATH];
snprintf(testfile, sizeof testfile, "%s" PATHSEP "file.tmp", srb2home); snprintf(testfile, sizeof testfile, "%s" PATHSEP "file.tmp", srb2home);
testfile[sizeof testfile - 1] = '\0'; testfile[sizeof testfile - 1] = '\0';