Fix compiler warnings

This commit is contained in:
James R 2021-09-12 18:53:51 -07:00
parent 952ae51669
commit fec5f2778e
5 changed files with 10 additions and 8 deletions

View file

@ -13,6 +13,7 @@
/// FS_FOUND
#include <stdio.h>
#include <errno.h>
#ifdef __GNUC__
#include <dirent.h>
#endif
@ -33,7 +34,6 @@
#if defined (_WIN32) && defined (_MSC_VER)
#include <errno.h>
#include <io.h>
#include <tchar.h>

View file

@ -31,7 +31,7 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
INT32 pathisdirectory(const char *path);
INT32 samepaths(const char *path1, const char *path2);
boolean concatpaths(const char *path, const char *startpath);
INT32 concatpaths(const char *path, const char *startpath);
#ifndef AVOID_ERRNO
extern int direrror;

View file

@ -401,14 +401,16 @@ static int camera_set(lua_State *L)
case camera_x:
case camera_y:
return luaL_error(L, LUA_QL("camera_t") " field " LUA_QS " should not be set directly. Use " LUA_QL("P_TryCameraMove") " or " LUA_QL("P_TeleportCameraMove") " instead.", camera_opt[field]);
case camera_chase:
case camera_chase: {
INT32 chase = luaL_checkboolean(L, 3);
if (cam == &camera)
CV_SetValue(&cv_chasecam, (INT32)luaL_checkboolean(L, 3));
CV_SetValue(&cv_chasecam, chase);
else if (cam == &camera2)
CV_SetValue(&cv_chasecam2, (INT32)luaL_checkboolean(L, 3));
CV_SetValue(&cv_chasecam2, chase);
else // ??? this should never happen, but ok
cam->chase = luaL_checkboolean(L, 3);
cam->chase = chase;
break;
}
case camera_aiming:
cam->aiming = luaL_checkangle(L, 3);
break;

View file

@ -550,7 +550,7 @@ static void I_StartupConsole(void)
void I_GetConsoleEvents(void)
{
// we use this when sending back commands
event_t ev = {0,0,0,0};
event_t ev = {0};
char key = 0;
ssize_t d;

View file

@ -152,7 +152,7 @@ void W_InitMultipleFiles(char **filenames);
#define W_FileHasFolders(wadfile) ((wadfile)->type == RET_PK3 || (wadfile)->type == RET_FOLDER)
boolean W_IsPathToFolderValid(const char *path);
INT32 W_IsPathToFolderValid(const char *path);
char *W_GetFullFolderPath(const char *path);
const char *W_CheckNameForNumPwad(UINT16 wad, UINT16 lump);