SW: Fix -Wformat-security

git-svn-id: https://svn.eduke32.com/eduke32@7553 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-04-10 01:00:15 +00:00 committed by Christoph Oelckers
parent 71847ec0f1
commit 6c62f4e52d
5 changed files with 8 additions and 11 deletions

View file

@ -2921,7 +2921,7 @@ _Assert(const char *expr, const char *strFile, unsigned uLine)
MONO_PRINT(ds);
TerminateGame();
#if 1 //def RENDERTYPEWIN
wm_msgbox(apptitle, ds);
wm_msgbox(apptitle, "%s", ds);
#else
printf("Assertion failed: %s\n %s, line %u\n", expr, strFile, uLine);
#endif
@ -2946,7 +2946,7 @@ _ErrMsg(const char *strFile, unsigned uLine, const char *format, ...)
va_start(arglist, format);
Bvsnprintf(msg, sizeof(msg) - (p-msg), format, arglist);
va_end(arglist);
wm_msgbox(apptitle, msg);
wm_msgbox(apptitle, "%s", msg);
}
#else
printf("Error: %s, line %u\n", strFile, uLine);
@ -4903,7 +4903,7 @@ void GetConInput(PLAYERp pp)
KB_ClearKeysDown();
KB_FlushKeyboardQueue();
CONTROL_ClearButton(gamefunc_Inventory);
CON_ConMessage(MessageInputString);
CON_ConMessage("%s", MessageInputString);
CON_ProcessUserCommand(); // Check to see if it's a cheat or command
conbot += 6;

View file

@ -1431,7 +1431,7 @@ static void sw_printmessage256(const char *text)
static void sw_printmessage16(const char *text)
{
lastpm16time = totalclock;
_printmessage16(text);
_printmessage16("%s", text);
}
void
@ -3582,10 +3582,7 @@ ShowNextTag(void)
return;
printmessage16(" ");
sprintf(tempbuf, "Next tag = %d", siNextEndTag);
printmessage16(tempbuf);
printmessage16("Next tag = %d", siNextEndTag);
}
void

View file

@ -753,7 +753,7 @@ SWBOOL CacheSound(int num, int type)
if (!OpenSound(vp, &handle, &length))
{
sprintf(ds,"Could not open sound %s, num %d, priority %d\n",vp->name,num,vp->priority);
CON_ConMessage(ds);
CON_ConMessage("%s", ds);
return FALSE;
}

View file

@ -5789,7 +5789,7 @@ KeyMain:
sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(10)]);
else
sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(MAX_FORTUNES)]);
CON_Message(ds);
CON_Message("%s", ds);
}
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup

View file

@ -461,7 +461,7 @@ void PutStringInfo(PLAYERp pp, const char *string)
if (!gs.Messages)
return;
CON_ConMessage(string); // Put it in the console too
CON_ConMessage("%s", string); // Put it in the console too
PutStringInfoLine(pp, string);
}