From 8d2d91a3bf9280cffe9156ef6eaad83079d273db Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 28 Oct 2022 21:26:31 +0100 Subject: [PATCH] Fix mixed declarations and code warning --- src/d_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 1948ad99..b2591b94 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1143,6 +1143,8 @@ void D_SRB2Main(void) { const char *userhome = D_Home(); //Alam: path to home + FILE *tmpfile; + char testfile[MAX_WADPATH]; if (!userhome) { @@ -1192,9 +1194,6 @@ void D_SRB2Main(void) // If config isn't writable, tons of behavior will be broken. // Fail loudly before things get confusing! - FILE *tmpfile; - char testfile[MAX_WADPATH]; - snprintf(testfile, sizeof testfile, "%s" PATHSEP "file.tmp", srb2home); testfile[sizeof testfile - 1] = '\0';