From 5bf30a09512090bfababd19e7ca54be1dcfa7c4e Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 12 Jun 2010 16:33:45 +0200 Subject: [PATCH] Changed: #825 Remove all warning when compiling Ryzom on Linux --- code/ryzom/client/src/character_cl.cpp | 18 ++++++++++++++---- .../client/src/client_sheets/plant_sheet.cpp | 14 +++++++++----- code/ryzom/client/src/commands.cpp | 2 +- .../client/src/interface_v3/chat_window.h | 2 +- .../client/src/interface_v3/group_html.cpp | 11 +++++------ code/ryzom/client/src/npc_icon.h | 2 +- .../src/r2/dmc/client_edition_module.cpp | 2 +- code/ryzom/client/src/release.cpp | 12 ++++++++++++ code/ryzom/client/src/seven_zip/7zAlloc.cpp | 1 - code/ryzom/client/src/seven_zip/7zBuffer.cpp | 2 -- code/ryzom/client/src/seven_zip/7zCrc.cpp | 1 - code/ryzom/client/src/seven_zip/7zMain.cpp | 1 - code/ryzom/client/src/seven_zip/7zTypes.h | 2 -- .../client/src/seven_zip/LzmaRamDecode.cpp | 1 - code/ryzom/client/src/seven_zip/LzmaTypes.h | 2 -- .../_backup_service_interface_non_module.cpp | 2 +- .../_backup_service_interface_singleton.cpp | 2 +- code/ryzom/common/src/game_share/pact.cpp | 4 ++-- .../common/src/game_share/persistent_data.cpp | 2 +- 19 files changed, 49 insertions(+), 34 deletions(-) diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index c9e4c87da..48b277e9c 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -1396,7 +1396,7 @@ void CCharacterCL::updateVisualPropertyBehaviour(const NLMISC::TGameCycle &gameC // New Behaviour Received. CBehaviour beh(prop); if(verboseVP(this)) - nlinfo("(%05d,%03d) CH::updateVPBeha:%d: '%s(%d)' received.", sint32(T1%100000), NetMngr.getCurrentServerTick(), _Slot, behaviourToString(beh.Behaviour).c_str(), beh.Behaviour); + nlinfo("(%05d,%03d) CH::updateVPBeha:%d: '%s(%d)' received.", sint32(T1%100000), NetMngr.getCurrentServerTick(), _Slot, behaviourToString((EBehaviour)beh.Behaviour).c_str(), beh.Behaviour); // Add in right stage. _Stages.addStage(gameCycle, PROPERTY_BEHAVIOUR, prop); @@ -2219,7 +2219,11 @@ void CCharacterCL::endAnimTransition() // If the animation is a rotation, set the character direction he should have at the end of the animation. if(_CurrentState->Rotation) { - if(isUser()) nldebug(" rotation : set dir as end anim dir"); + if(isUser()) + { + nldebug(" rotation : set dir as end anim dir"); + } + dir(dirEndAnim()); } // Fit the current direction to the target when attacking. @@ -4173,6 +4177,8 @@ void CCharacterCL::performCurrentAttackEnd(const CBehaviourContext &bc, bool dir } } break; + default: + break; } // if object has a list of cast rays, then we assume it is a static object (like guard towers) @@ -4671,7 +4677,7 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual // INFO : display some debug informations. if((VerboseAnimUser && _Slot==0) || (VerboseAnimSelection && _Slot == UserEntity->selection())) - nlinfo("CH:applyBeh:%d: '%d(%s)'", _Slot, behaviour.Behaviour, behaviourToString(behaviour.Behaviour).c_str()); + nlinfo("CH:applyBeh:%d: '%d(%s)'", _Slot, behaviour.Behaviour, behaviourToString((EBehaviour)behaviour.Behaviour).c_str()); // ***** Apply the behaviour according to type @@ -4730,6 +4736,8 @@ void CCharacterCL::applyBehaviour(const CBehaviourContext &bc) // virtual case MBEHAV::CAST_MIX_LINK: endCast(behaviour, previousBehaviour); break; + default: + break; } // DeltaHP applyBehaviourFlyingHPs(bc, behaviour, targetHitDates); @@ -6668,7 +6676,9 @@ ADD_METHOD(void CCharacterCL::updatePos(const TTime ¤tTimeInMs, CEntityCL // Else : There is no move. } else + { CHECK(posInStage==false && dist2Dest()<=0.0); + } // If there is no position in the next stage and the stage should be done already. if(!_Stages._StageSet.empty() && !posInStage && !stageReach && !allToFirstPos && ((_LastFrameTime+loopTimeStep) >= stageTime)) @@ -6682,7 +6692,7 @@ ADD_METHOD(void CCharacterCL::updatePos(const TTime ¤tTimeInMs, CEntityCL if(loopTimeStep < 0.0) loopTimeStep = 0.0; // - // \todo GUIGUI : ajuster le timeOffset comme on arrete la boucle avant l'heure + // \todo GUIGUI : adjust timeOffset, because we stopped the loop before // // Stage complete. stageReach = true; diff --git a/code/ryzom/client/src/client_sheets/plant_sheet.cpp b/code/ryzom/client/src/client_sheets/plant_sheet.cpp index f4b9d9ddc..331fac0d2 100644 --- a/code/ryzom/client/src/client_sheets/plant_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/plant_sheet.cpp @@ -139,7 +139,10 @@ void CSeasonFXSheet::build(const NLGEORGES::UFormElm &item, NLMISC::CSheetId par NLMISC::clamp(MinDuration, 0.f, CycleDuration /*- startHourMaxInterval*/); NLMISC::clamp(MaxDuration, 0.f, CycleDuration /*- startHourMaxInterval*/); - if (!ok) nldebug("Key not found."); + if (!ok) + { + nldebug("Key not found."); + } } //======================================================= @@ -210,10 +213,11 @@ void CPlantSheet::build(const NLGEORGES::UFormElm &item) { if(!(item.getValueByName(_ShapeName, "3D.Shape") && item.getValueByName(_MaxDist, "3D.MaxDist") && - item.getValueByName(_CoarseMeshDist, "3D.CoarseMeshDist") - ) - ) - nldebug("Key not found."); + item.getValueByName(_CoarseMeshDist, "3D.CoarseMeshDist"))) + { + nldebug("Key not found."); + } + // serial fxs by season SeasonFX[EGSPD::CSeason::Spring].build(item, Id, "3D.SpringFX."); SeasonFX[EGSPD::CSeason::Summer].build(item, Id, "3D.SummerFX."); diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index c69d91733..353ab705c 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -890,7 +890,7 @@ NLMISC_COMMAND(db, "Modify Database"," ") static bool talkInChan(uint32 nb,std::vectorargs) { uint32 maxChans = CChatGroup::MaxDynChanPerPlayer; - if (nb<0||nb>=maxChans) + if (nb>=maxChans) { return false; } diff --git a/code/ryzom/client/src/interface_v3/chat_window.h b/code/ryzom/client/src/interface_v3/chat_window.h index dd5bfaac1..77cce3487 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.h +++ b/code/ryzom/client/src/interface_v3/chat_window.h @@ -49,7 +49,7 @@ struct CChatWindowDesc ucstring Title; // unique title for the window std::string FatherContainer; // name of the father container. If empty, the chat box must be added manually in the hierarchy std::string ChatTemplate; // Template for the chat interface, or "" to use the default one - TTemplateParams ChatTemplateParams; // optional tempalte parameters + TTemplateParams ChatTemplateParams; // optional template parameters sint InsertPosition; // [optional] -1 if the chat box should be inserted at the end of the container list, or the index otherwise bool ParentBlink; // [optional] when true, make the parent group blink bool Savable; // should the position of the chat box be saved between session ? Default is false diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 006ea1785..9caea5382 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -2475,13 +2475,12 @@ void CGroupHTML::setTitle (const ucstring &title) CInterfaceElement *parent = getParent(); if (parent) { - if (parent = parent->getParent()) + parent = parent->getParent(); + + CGroupContainer *container = dynamic_cast(parent); + if (container) { - CGroupContainer *container = dynamic_cast(parent); - if (container) - { - container->setUCTitle (title); - } + container->setUCTitle (title); } } } diff --git a/code/ryzom/client/src/npc_icon.h b/code/ryzom/client/src/npc_icon.h index 697fc1873..07a5ec4eb 100644 --- a/code/ryzom/client/src/npc_icon.h +++ b/code/ryzom/client/src/npc_icon.h @@ -61,7 +61,7 @@ class CNPCMissionGiverDesc public: /// Constructor - CNPCMissionGiverDesc() : _MissionGiverState(NPC_ICON::AwaitingFirstData), _IsDescTransient(true), _HasChanged(false) + CNPCMissionGiverDesc() : _MissionGiverState(NPC_ICON::AwaitingFirstData), _LastUpdateTimestamp(0), _IsDescTransient(true), _HasChanged(false) {} // Current assignment operator: bitwise copy diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index d860cd951..fc8ec2b51 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -66,7 +66,7 @@ #include "../../far_tp.h" #include "../../net_manager.h" -#include "zlib.h" +#include diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index 1f8f84a3f..7dd8519bd 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -220,10 +220,16 @@ void releaseMainLoopReselect() // Remove all entities. if (Driver) + { nldebug("RCSR1: %u textures", Driver->getTotalAsyncTextureSizeAsked()); + } + EntitiesMngr.release(); + if (Driver) + { nldebug("RCSR2: %u textures", Driver->getTotalAsyncTextureSizeAsked()); + } // Reset Fx manager (must be done after EntitiesMngr.release()) Important because may still point to 3D elements FXMngr.reset(); @@ -266,11 +272,17 @@ void releaseMainLoopReselect() // Release the Entities Animation Manager (Yoyo: fuckingly important because keep a pointer // on a _PlayListManager that is created from Scene) if (Driver) + { nldebug("RCSR3: %u textures", Driver->getTotalAsyncTextureSizeAsked()); + } + CEntityAnimationManager::delInstance(); EAM= NULL; + if (Driver) + { nldebug("RCSR4: %u textures", Driver->getTotalAsyncTextureSizeAsked()); + } // Not necessary I think because owns only static data (string + function ptrs) // --releaseContextualCursor(); diff --git a/code/ryzom/client/src/seven_zip/7zAlloc.cpp b/code/ryzom/client/src/seven_zip/7zAlloc.cpp index 3e8e6387a..d5da81b12 100644 --- a/code/ryzom/client/src/seven_zip/7zAlloc.cpp +++ b/code/ryzom/client/src/seven_zip/7zAlloc.cpp @@ -1,6 +1,5 @@ /* 7zAlloc.c */ -#include "nel/misc/types_nl.h" #include #include "7zAlloc.h" diff --git a/code/ryzom/client/src/seven_zip/7zBuffer.cpp b/code/ryzom/client/src/seven_zip/7zBuffer.cpp index 1d47d4055..8bc8e0670 100644 --- a/code/ryzom/client/src/seven_zip/7zBuffer.cpp +++ b/code/ryzom/client/src/seven_zip/7zBuffer.cpp @@ -1,7 +1,5 @@ /* 7zBuffer.c */ -#include "nel/misc/types_nl.h" - #include "7zBuffer.h" #include "7zAlloc.h" diff --git a/code/ryzom/client/src/seven_zip/7zCrc.cpp b/code/ryzom/client/src/seven_zip/7zCrc.cpp index 37861d035..6dc7dd325 100644 --- a/code/ryzom/client/src/seven_zip/7zCrc.cpp +++ b/code/ryzom/client/src/seven_zip/7zCrc.cpp @@ -1,6 +1,5 @@ /* 7zCrc.c */ -#include "nel/misc/types_nl.h" #include "7zCrc.h" #define kCrcPoly 0xEDB88320 diff --git a/code/ryzom/client/src/seven_zip/7zMain.cpp b/code/ryzom/client/src/seven_zip/7zMain.cpp index 00ff961a9..ee2ac82b7 100644 --- a/code/ryzom/client/src/seven_zip/7zMain.cpp +++ b/code/ryzom/client/src/seven_zip/7zMain.cpp @@ -14,7 +14,6 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -#include "nel/misc/types_nl.h" #include #include #include diff --git a/code/ryzom/client/src/seven_zip/7zTypes.h b/code/ryzom/client/src/seven_zip/7zTypes.h index 104b8e042..0e01e8748 100644 --- a/code/ryzom/client/src/seven_zip/7zTypes.h +++ b/code/ryzom/client/src/seven_zip/7zTypes.h @@ -3,8 +3,6 @@ #ifndef __COMMON_TYPES_H #define __COMMON_TYPES_H -#include "nel/misc/types_nl.h" - #ifndef _7ZIP_BYTE_DEFINED #define _7ZIP_BYTE_DEFINED typedef unsigned char Byte; diff --git a/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp b/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp index 251a8ba67..0f0f84248 100644 --- a/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp +++ b/code/ryzom/client/src/seven_zip/LzmaRamDecode.cpp @@ -1,6 +1,5 @@ /* LzmaRamDecode.c */ -#include "nel/misc/types_nl.h" #include "LzmaRamDecode.h" #ifdef _SZ_ONE_DIRECTORY #include "LzmaDecode.h" diff --git a/code/ryzom/client/src/seven_zip/LzmaTypes.h b/code/ryzom/client/src/seven_zip/LzmaTypes.h index 19844cdc5..4a1f7db49 100644 --- a/code/ryzom/client/src/seven_zip/LzmaTypes.h +++ b/code/ryzom/client/src/seven_zip/LzmaTypes.h @@ -10,8 +10,6 @@ This file is part of LZMA SDK 4.40 (2006-05-01) #ifndef __LZMATYPES_H #define __LZMATYPES_H -#include "nel/misc/types_nl.h" - #ifndef _7ZIP_BYTE_DEFINED #define _7ZIP_BYTE_DEFINED typedef unsigned char Byte; diff --git a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp index 1315bddf8..0fc3df40f 100644 --- a/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp +++ b/code/ryzom/common/src/game_share/_backup_service_interface_non_module.cpp @@ -85,7 +85,7 @@ private: void CGenericRequestIdRegister::pushRequestId(uint32 requestId,const std::string& fileName) { // check for out of order entries in the request list - BOMB_IF(!_RequestIds.empty() && uint32(requestId-_RequestIds.back().RequestId)<0,"Ignoring out of order request id in generic callback registration for file "+CSString(fileName).quote(),return); + BOMB_IF(!_RequestIds.empty() && ((sint32)requestId-(sint32)_RequestIds.back().RequestId)<0,"Ignoring out of order request id in generic callback registration for file "+CSString(fileName).quote(),return); // setup a new record for this request id / file name pair SRequestId theNewRequestId; diff --git a/code/ryzom/common/src/game_share/_backup_service_interface_singleton.cpp b/code/ryzom/common/src/game_share/_backup_service_interface_singleton.cpp index 524ef5df2..efff0524d 100644 --- a/code/ryzom/common/src/game_share/_backup_service_interface_singleton.cpp +++ b/code/ryzom/common/src/game_share/_backup_service_interface_singleton.cpp @@ -174,7 +174,7 @@ uint32 CBackupInterfaceSingleton::pushGenericAckCallback(NLMISC::CSmartPtr= sizeof(pactNatureStrings)/sizeof(string) ) + if ((uint)pactNature >= sizeof(pactNatureStrings)/sizeof(string) ) { nlwarning("= sizeof(pactTypeStrings)/sizeof(string) ) + if ((uint)pactType >= sizeof(pactTypeStrings)/sizeof(string) ) { nlwarning(" clauses; bool clauseOpen=false; - uint32 clauseEnd; + uint32 clauseEnd = 0; for (uint32 i=len;i--;) { switch(buff[i])