From 31d1018b9a30dfbc392f7da931ee6efb716d321e Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 3 Dec 2017 13:18:47 +0200 Subject: [PATCH] Fixed compilation warnings reported by GCC/Clang b_game.cpp:537:27: warning: more '%' conversions than data arguments [-Wformat] g_game.cpp:2982:40: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare] --- src/b_game.cpp | 4 ++-- src/g_game.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/b_game.cpp b/src/b_game.cpp index 4300e0ada..661d09c6e 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -534,7 +534,7 @@ bool FCajunMaster::LoadBots () } if (!sc.OpenFile(tmp)) { - Printf("Unable to open %s. So no bots\n"); + Printf("Unable to open %s. So no bots\n", tmp.GetChars()); return false; } @@ -665,4 +665,4 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, RemoveAllBots) PARAM_BOOL(fromlist); bglobal.RemoveAllBots(fromlist); return 0; -} \ No newline at end of file +} diff --git a/src/g_game.cpp b/src/g_game.cpp index f56bdac8e..0adfa2fc9 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -2978,7 +2978,7 @@ bool G_CheckDemoStatus (void) bool saved = false; if (fw != nullptr) { - auto size = long(demo_p - demobuffer); + const size_t size = demo_p - demobuffer; saved = fw->Write(demobuffer, size) == size; delete fw; if (!saved) remove(demoname);