From fb20730960221deae908874f622921fc11068e4c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 29 Aug 2020 10:36:29 +0300 Subject: [PATCH] - 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] --- src/console/c_cmds.cpp | 2 +- src/scripting/vmthunks.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/console/c_cmds.cpp b/src/console/c_cmds.cpp index 026db5c3ed..51664da4c3 100644 --- a/src/console/c_cmds.cpp +++ b/src/console/c_cmds.cpp @@ -687,7 +687,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"); } diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 0bbeffd59c..e913bec654 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -2695,7 +2695,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]) {