- fixed compilation warnings introduced recently

src/console/c_cmds.cpp:690:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
src/scripting/vmthunks.cpp:2698:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
This commit is contained in:
alexey.lysiuk 2020-08-29 10:36:29 +03:00 committed by drfrag
parent 26f2bfe3fd
commit 3ff3a5f846
2 changed files with 2 additions and 2 deletions

View file

@ -881,7 +881,7 @@ CCMD(getdate)
{
char timeString[1024];
if (strftime(timeString, sizeof(timeString), "%H:%M:%S %d-%m-%Y%n", timeinfo))
Printf(timeString);
Printf("%s\n", timeString);
else
Printf("Error Retrieving Current Date\n");
}

View file

@ -2893,7 +2893,7 @@ static FString CheckStrfString(FString timeForm)
if (t.Len() == 0) return FString("%");
// Single Character
for (int i = 0; i < sizeof(validSingles)/sizeof(validSingles[0]); i++)
for (size_t i = 0; i < sizeof(validSingles)/sizeof(validSingles[0]); i++)
{
if (t[0] == validSingles[i])
{