fix gcc crap

master
an 2019-12-12 01:49:16 -05:00
parent 6eb2ea7586
commit f0e0176aa8
4 changed files with 8 additions and 10 deletions

View File

@ -1286,7 +1286,7 @@ void LOG_Init(quakeparms_t *parms)
return;
inittime = time(NULL);
strftime(session, sizeof(session), "%m/%" PRIi32 "/%Y %H:%M:%S", localtime(&inittime));
strftime(session, sizeof(session), "%m/%u/%Y %H:%M:%S", localtime(&inittime));
q_snprintf(logfilename, sizeof(logfilename), "%s/qconsole.log", parms->basedir);
// unlink (logfilename);

View File

@ -391,8 +391,8 @@ void PR_ExecuteProgram(func_t fnum)
CASE(OP_EQ_V)
OPC->flt = OPA->vec[0] == OPB->vec[0] &&
OPA->vec[1] == OPB->vec[1] &&
OPA->vec[2] == OPB->vec[2];
OPA->vec[1] == OPB->vec[1] &&
OPA->vec[2] == OPB->vec[2];
BREAK
CASE(OP_EQ_S)
OPC->flt = !strcmp(PR_GetString(OPA->string), PR_GetString(OPB->string));
@ -402,8 +402,8 @@ void PR_ExecuteProgram(func_t fnum)
CASE(OP_NE_V)
OPC->flt = OPA->vec[0] != OPB->vec[0] ||
OPA->vec[1] != OPB->vec[1] ||
OPA->vec[2] != OPB->vec[2];
OPA->vec[1] != OPB->vec[1] ||
OPA->vec[2] != OPB->vec[2];
BREAK
CASE(OP_NE_S)
OPC->flt = strcmp(PR_GetString(OPA->string), PR_GetString(OPB->string));

View File

@ -415,7 +415,7 @@ This is passed to SDL_SetWindowDisplayMode to specify a pixel format
with the requested bpp. If we didn't care about bpp we could just pass NULL.
================
*/
static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, int32_t refreshrate, int32_t bpp)
static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, int32_t refreshrate, uint32_t bpp)
{
static SDL_DisplayMode mode;
const int32_t sdlmodes = SDL_GetNumDisplayModes(0);
@ -426,9 +426,7 @@ static SDL_DisplayMode *VID_SDL2_GetDisplayMode(int32_t width, int32_t height, i
if(SDL_GetDisplayMode(0, i, &mode) != 0)
continue;
if(mode.w == width && mode.h == height
&& SDL_BITSPERPIXEL(mode.format) == bpp
&& mode.refresh_rate == refreshrate)
if(mode.w == width && mode.h == height && SDL_BITSPERPIXEL(mode.format) == bpp && mode.refresh_rate == refreshrate)
{
return &mode;
}

View File

@ -230,7 +230,7 @@ static char const *Sys_GetUserDir(void)
char const *system_dir;
if((system_dir = getenv("XDG_DATA_HOME")))
q_snprintf(user_dir, sizeof(user_dir), "%s/%s/%s", home_dir, system_dir, app_name);
q_snprintf(user_dir, sizeof(user_dir), "%s/%s", system_dir, app_name);
else
{
if(!(home_dir = Sys_GetHomeDir()))