From 79318735ab4f6504688d0af4c1e4779788f0e785 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Thu, 21 Oct 2010 18:24:54 +0000 Subject: [PATCH] - cleanup of last compiler warnings in Linux (hurray!) --- source/glest_game/ai/path_finder.cpp | 2 +- source/glest_game/network/client_interface.cpp | 2 +- source/shared_lib/sources/util/conversion.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/glest_game/ai/path_finder.cpp b/source/glest_game/ai/path_finder.cpp index 6e4bfec7..3da3de86 100644 --- a/source/glest_game/ai/path_finder.cpp +++ b/source/glest_game/ai/path_finder.cpp @@ -386,7 +386,7 @@ TravelState PathFinder::aStar(Unit *unit, const Vec2i &targetPos, bool inBailout std::pair lastHarvest = unit->getLastHarvestResourceTarget(); char szBuf[1024]=""; - sprintf(szBuf,"State: blocked, cmd [%s] pos: [%s], dest pos: [%s], lastHarvest = [%s - %lld], reason A= %d, B= %d, C= %d, D= %d, E= %d, F = %d",commandDesc.c_str(),unit->getPos().getString().c_str(), targetPos.getString().c_str(),lastHarvest.first.getString().c_str(),lastHarvest.second.getMillis(), pathFound,(lastNode == firstNode),path->getBlockCount(), path->isBlocked(), nodeLimitReached,path->isStuck()); + sprintf(szBuf,"State: blocked, cmd [%s] pos: [%s], dest pos: [%s], lastHarvest = [%s - %lld], reason A= %d, B= %d, C= %d, D= %d, E= %d, F = %d",commandDesc.c_str(),unit->getPos().getString().c_str(), targetPos.getString().c_str(),lastHarvest.first.getString().c_str(),(long long int)lastHarvest.second.getMillis(), pathFound,(lastNode == firstNode),path->getBlockCount(), path->isBlocked(), nodeLimitReached,path->isStuck()); unit->setCurrentUnitTitle(szBuf); } diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index 19d2c624..f400f4f0 100755 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -721,7 +721,7 @@ void ClientInterface::waitUntilReady(Checksum* checksum) { lastMillisCheck = (chrono.getMillis() / 1000); char szBuf[1024]=""; - sprintf(szBuf,"Waiting for network: %lld seconds elapsed (maximum wait time: %d seconds)",lastMillisCheck,int(readyWaitTimeout / 1000)); + sprintf(szBuf,"Waiting for network: %lld seconds elapsed (maximum wait time: %d seconds)",(long long int)lastMillisCheck,int(readyWaitTimeout / 1000)); logger.add(szBuf, true); } } diff --git a/source/shared_lib/sources/util/conversion.cpp b/source/shared_lib/sources/util/conversion.cpp index 5965fdaf..4eaee2c9 100644 --- a/source/shared_lib/sources/util/conversion.cpp +++ b/source/shared_lib/sources/util/conversion.cpp @@ -106,7 +106,7 @@ string boolToStr(bool b){ string intToStr(int64 i) { char str[strSize]=""; - sprintf(str, "%lld", i); + sprintf(str, "%lld", (long long int)i); return str; }