From 8cd6548990cb0b106b320c07cc9939cfcf7b5882 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Sep 2010 19:46:43 +0200 Subject: [PATCH] Changed: #825 Remove all warnings when compiling Ryzom --- .../server/src/log_analyser_service/commands.cpp | 2 +- .../log_analyser_service.cpp | 10 +++++----- code/ryzom/tools/make_anim_by_race/main.cpp | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/ryzom/server/src/log_analyser_service/commands.cpp b/code/ryzom/server/src/log_analyser_service/commands.cpp index 5e04b02ee..0932a66c4 100644 --- a/code/ryzom/server/src/log_analyser_service/commands.cpp +++ b/code/ryzom/server/src/log_analyser_service/commands.cpp @@ -53,7 +53,7 @@ std::string decodeDbPathId(const std::string& pathid) std::string shard(""); uint id; - uint p = pathid.find(':'); + string::size_type p = pathid.find(':'); if (p == std::string::npos) { diff --git a/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp b/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp index 5ca4c19e1..43f801685 100644 --- a/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp +++ b/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp @@ -247,7 +247,7 @@ bool CLogAnalyserService::getQueryResult(uint32 queryId, std::string& result, si if (filter.empty()) { - numpage = (_Finished[i]->Result.size()+linePerPage-1) / linePerPage; + numpage = ((uint)_Finished[i]->Result.size()+linePerPage-1) / linePerPage; if (page >= (sint)numpage) page = numpage-1; @@ -329,7 +329,7 @@ bool CLogAnalyserService::getQueryResult(uint32 queryId, std::string& result, si } // refresh numpage - numpage = (matchingLines.size()+linePerPage-1) / linePerPage; + numpage = ((uint)matchingLines.size()+linePerPage-1) / linePerPage; if (page >= (sint)numpage) page = numpage-1; @@ -374,7 +374,7 @@ void CLogAnalyserService::getQueryList(std::vector& queries) { _Mutex.enter(); sint i; - for (i=_Requests.size()-1; i>=0; --i) + for (i=(sint)_Requests.size()-1; i>=0; --i) { CQuery* q = _Requests[i]; q->State = QueryAwaiting; @@ -387,7 +387,7 @@ void CLogAnalyserService::getQueryList(std::vector& queries) queries.push_back(_Current); } - for (i=_Finished.size()-1; i>=0; --i) + for (i=(sint)_Finished.size()-1; i>=0; --i) { CQuery* q = _Finished[i]; q->State = QueryTreated; @@ -455,7 +455,7 @@ void cbResult(CMemStream &msgin, TSockId host) //nlinfo("received query '%s'", idStr.c_str()); - uint pos = idStr.find("%!"); + string::size_type pos = idStr.find("%!"); if (pos != std::string::npos) { // parse input diff --git a/code/ryzom/tools/make_anim_by_race/main.cpp b/code/ryzom/tools/make_anim_by_race/main.cpp index a707b5cb3..eedc1cd90 100644 --- a/code/ryzom/tools/make_anim_by_race/main.cpp +++ b/code/ryzom/tools/make_anim_by_race/main.cpp @@ -52,7 +52,7 @@ void buildRaceAnimNames(std::vector &raceAnimNames, const std::string &a } // *************************************************************************** -uint findAnimName(const string &lineLwr, const std::vector &raceAnimNames) +string::size_type findAnimName(const string &lineLwr, const std::vector &raceAnimNames) { // line Must contains Name="filename", else CAN BE A LOAD CHAR ANIMATION!!!! if(lineLwr.find("name=\"filename\"")==string::npos) @@ -61,11 +61,11 @@ uint findAnimName(const string &lineLwr, const std::vector &raceAnimName // in the animset, the original file can be a "tr_" ... Not necessarily a "fy_" for(uint i=0;i &a raceRestrictionFound= true; // Find the anim name? - uint nameIndexInLine= findAnimName(lineLwr, raceAnimNames); - if(nameIndexInLine!=-1) + string::size_type nameIndexInLine= findAnimName(lineLwr, raceAnimNames); + if(nameIndexInLine!=string::npos) { // Find the enclosing struct nlassert(lastStructLine!=0); @@ -220,9 +220,9 @@ void makeAnimByRace(const std::string &animSetFile, const std::vector &a // Append for each race for(uint k=0;k &a { string str= animSetText[i]; str+= "\n"; - oFile.serialBuffer((uint8*)str.c_str(), str.size()); + oFile.serialBuffer((uint8*)str.c_str(), (uint)str.size()); } } }