Fix compiler warnings

This commit is contained in:
James R 2020-02-20 17:18:26 -08:00
parent 36a7539f33
commit 26ff2e0355
3 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,6 @@
#define FMT_FILECALLBACKID "file_callback_%d" #define FMT_FILECALLBACKID "file_callback_%d"
static const char *const fnames[] = {"input", "output"};
static const char *whitelist[] = { // Allow scripters to write files of these types to SRB2's folder static const char *whitelist[] = { // Allow scripters to write files of these types to SRB2's folder
".bmp", ".bmp",
".cfg", ".cfg",
@ -230,6 +229,7 @@ static int io_openlocal (lua_State *L) {
FILE **pf; FILE **pf;
const char *filename = luaL_checkstring(L, 1); const char *filename = luaL_checkstring(L, 1);
const char *mode = luaL_optstring(L, 2, "r"); const char *mode = luaL_optstring(L, 2, "r");
char *realfilename;
luafiletransfer_t *filetransfer; luafiletransfer_t *filetransfer;
int checkresult; int checkresult;
@ -237,7 +237,7 @@ static int io_openlocal (lua_State *L) {
if (checkresult) if (checkresult)
return checkresult; return checkresult;
char *realfilename = va("%s" PATHSEP "%s", luafiledir, filename); realfilename = va("%s" PATHSEP "%s", luafiledir, filename);
if (client && strnicmp(filename, "client/", strlen("client/"))) if (client && strnicmp(filename, "client/", strlen("client/")))
I_Error("Access denied to %s\n" I_Error("Access denied to %s\n"

View file

@ -98,7 +98,7 @@ INT32 lastfilenum = -1;
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
luafiletransfer_t *luafiletransfers = NULL; luafiletransfer_t *luafiletransfers = NULL;
boolean waitingforluafiletransfer = false; boolean waitingforluafiletransfer = false;
char luafiledir[256] = "luafiles"; char luafiledir[MAX_WADPATH] = "luafiles";
#endif #endif

View file

@ -93,7 +93,7 @@ typedef struct luafiletransfer_s
extern luafiletransfer_t *luafiletransfers; extern luafiletransfer_t *luafiletransfers;
extern boolean waitingforluafiletransfer; extern boolean waitingforluafiletransfer;
extern char luafiledir[256]; extern char luafiledir[MAX_WADPATH];
void AddLuaFileTransfer(const char *filename, const char *mode); void AddLuaFileTransfer(const char *filename, const char *mode);
void SV_PrepareSendLuaFileToNextNode(void); void SV_PrepareSendLuaFileToNextNode(void);