From 3429d7ba421565d47b66dcd9d483956c841a8fab Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 25 Sep 2012 12:33:02 +0200 Subject: [PATCH] Changed: #825 Remove all warnings when compiling Ryzom --- code/CMakeModules/nel.cmake | 4 +- code/nel/include/nel/misc/eval_num_expr.h | 2 +- code/nel/include/nel/net/message_recorder.h | 2 +- code/nel/src/3d/tangent_space_build.cpp | 6 +- code/nel/src/misc/eval_num_expr.cpp | 2 +- code/nel/src/misc/i18n.cpp | 6 +- code/nel/src/misc/time_nl.cpp | 6 + .../tools/3d/tile_edit_qt/browser_model.cpp | 17 ++- code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c | 2 +- .../tools/3d/tile_edit_qt/pic/Pic_Manage.c | 2 +- code/nel/tools/3d/tile_edit_qt/pic/pic.h | 2 +- .../tools/3d/tile_edit_qt/pic/pic_private.h | 140 +++++++++--------- code/ryzom/client/src/character_cl.cpp | 2 +- code/ryzom/client/src/init.cpp | 3 +- .../src/interface_v3/action_handler_help.cpp | 4 +- .../interface_v3/animal_position_state.cpp | 2 +- .../src/interface_v3/brick_learned_callback.h | 1 + .../client/src/interface_v3/chat_window.h | 2 +- .../client/src/interface_v3/group_html.cpp | 4 +- .../client/src/interface_v3/group_menu.cpp | 2 +- .../client/src/interface_v3/interface_anim.h | 4 +- .../src/interface_v3/interface_expr.cpp | 4 +- .../src/interface_v3/interface_manager.h | 1 + code/ryzom/client/src/r2/dmc/dmc.h | 2 +- code/ryzom/common/src/game_share/ai_wrapper.h | 4 + code/ryzom/tools/assoc_mem/field.h | 2 +- code/ryzom/tools/assoc_mem/node.h | 2 +- code/ryzom/tools/assoc_mem/record.h | 2 +- .../src/georgesform_model.cpp | 2 + .../src/georgesform_proxy_model.cpp | 2 + .../translation_tools/extract_bot_names.cpp | 4 +- 31 files changed, 135 insertions(+), 105 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 0c784786f..fb7ff9a3f 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -527,7 +527,7 @@ MACRO(NL_SETUP_BUILD) ENDIF(HOST_CPU STREQUAL "x86" AND TARGET_CPU STREQUAL "x86_64") ENDIF(APPLE) - SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_REENTRANT -pipe -ftemplate-depth-48 -Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing") + SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_REENTRANT -pipe -Wall -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-unused -fno-strict-aliasing") IF(NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -ansi") @@ -581,7 +581,7 @@ MACRO(NL_SETUP_BUILD) SET(PLATFORM_CFLAGS "-fPIC ${PLATFORM_CFLAGS}") ENDIF(TARGET_X64 AND WITH_STATIC AND NOT WITH_STATIC_DRIVERS) - SET(PLATFORM_CXXFLAGS ${PLATFORM_CFLAGS}) + SET(PLATFORM_CXXFLAGS "${PLATFORM_CFLAGS} -ftemplate-depth-48") IF(NOT APPLE) SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--no-undefined -Wl,--as-needed") diff --git a/code/nel/include/nel/misc/eval_num_expr.h b/code/nel/include/nel/misc/eval_num_expr.h index 18cb14725..8551e49df 100644 --- a/code/nel/include/nel/misc/eval_num_expr.h +++ b/code/nel/include/nel/misc/eval_num_expr.h @@ -241,7 +241,7 @@ private: LogicalXor, // ^^ OperatorCount, // NotOperator, // This is not an operator - ExtOperator, // This is a 2 charcters operator + ExtOperator, // This is a 2 characters operator }; // Functions diff --git a/code/nel/include/nel/net/message_recorder.h b/code/nel/include/nel/net/message_recorder.h index a7b5ac51f..5874aca4c 100644 --- a/code/nel/include/nel/net/message_recorder.h +++ b/code/nel/include/nel/net/message_recorder.h @@ -79,7 +79,7 @@ struct TMessageRecord stream.serial( s_event ); uint32 sockId; stream.serialHex( sockId ); - SockId = (NLNET::TSockId)sockId; + SockId = (NLNET::TSockId)(size_t)sockId; len = Message.length(); stream.serial( len ); stream.serialBuffer( const_cast(Message.buffer()), len ); // assumes the message contains plain text diff --git a/code/nel/src/3d/tangent_space_build.cpp b/code/nel/src/3d/tangent_space_build.cpp index 17e106615..8a1b1100a 100644 --- a/code/nel/src/3d/tangent_space_build.cpp +++ b/code/nel/src/3d/tangent_space_build.cpp @@ -214,9 +214,9 @@ bool BuildTangentSpace(CMesh::CMeshBuild &outMeshBuild, const CMesh::CMeshBuild if (!canShare) continue; // Get indices of vertices of current tri - const uint indices[] = { f.Corner[0].Vertex, - f.Corner[1].Vertex, - f.Corner[2].Vertex }; + const uint indices[] = { (uint)f.Corner[0].Vertex, + (uint)f.Corner[1].Vertex, + (uint)f.Corner[2].Vertex }; NLMISC::CTriangle tri; // Build it BuildTriFromMB(outMeshBuild, indices, tri); diff --git a/code/nel/src/misc/eval_num_expr.cpp b/code/nel/src/misc/eval_num_expr.cpp index cf543c260..de7f3b2bf 100644 --- a/code/nel/src/misc/eval_num_expr.cpp +++ b/code/nel/src/misc/eval_num_expr.cpp @@ -1309,7 +1309,7 @@ const int CEvalNumExpr::_OperatorPrecedence[]= 9, // LogicalAnd 10, // LogicalOr 11, // LogicalXor - 0xffffffff, // OperatorCount + -1, // OperatorCount 20, // NotOperator }; diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index 92da17250..c68b190c5 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -914,9 +914,9 @@ void CI18N::_readTextFile(const string &filename, void CI18N::readTextBuffer(uint8 *buffer, uint size, ucstring &result, bool forceUtf8) { - static uint8 utf16Header[] = {char(0xff), char(0xfe)}; - static uint8 utf16RevHeader[] = {char(0xfe), char(0xff)}; - static uint8 utf8Header[] = {char(0xef), char(0xbb), char(0xbf)}; + static uint8 utf16Header[] = { 0xffu, 0xfeu }; + static uint8 utf16RevHeader[] = { 0xfeu, 0xffu }; + static uint8 utf8Header[] = { 0xefu, 0xbbu, 0xbfu }; if (forceUtf8) { diff --git a/code/nel/src/misc/time_nl.cpp b/code/nel/src/misc/time_nl.cpp index dd43fd2f7..422ba192f 100644 --- a/code/nel/src/misc/time_nl.cpp +++ b/code/nel/src/misc/time_nl.cpp @@ -280,11 +280,17 @@ void CTime::probeTimerInfo(CTime::CTimerInfo &result) else result.RequiresSingleCore = false; if (result.HighPrecisionResolution == 14318180) + { nldebug("Detected known HPET era timer frequency"); + } if (result.HighPrecisionResolution == 3579545) + { nldebug("Detected known AHCI era timer frequency"); + } if (result.HighPrecisionResolution == 1193182) + { nldebug("Detected known i8253/i8254 era timer frequency"); + } } } diff --git a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp b/code/nel/tools/3d/tile_edit_qt/browser_model.cpp index 8b8e4ae75..6b22e2f8e 100644 --- a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/browser_model.cpp @@ -317,6 +317,8 @@ bool TileList::setTile128 (int tile, const std::string& name, NL3D::CTile::TBitm case CTile::alpha: theList128[tile].alphaLoaded=0; break; + default: + break; } Reload(tile, tile + 1, _128x128); } @@ -378,6 +380,8 @@ bool TileList::setTile256 (int tile, const std::string& name, NL3D::CTile::TBitm case CTile::alpha: theList256[tile].alphaLoaded=0; break; + default: + break; } Reload(tile, tile + 1, _256x256); } @@ -442,6 +446,8 @@ bool TileList::setTileTransition (int tile, const std::string& name, NL3D::CTile case CTile::alpha: theListTransition[tile].alphaLoaded=0; break; + default: + break; } Reload(tile, tile + 1, Transition); } @@ -603,6 +609,8 @@ void TileList::clearTile128 (int index, CTile::TBitmap bitmap) case CTile::alpha: nlassert(0); break; + default: + break; } tileBankBrowser.getTileSet (_tileSet)->clearTile128 (index, bitmap, tileBankBrowser); } @@ -622,6 +630,8 @@ void TileList::clearTile256 (int index, CTile::TBitmap bitmap) case CTile::alpha: nlassert(0); break; + default: + break; } tileBankBrowser.getTileSet (_tileSet)->clearTile256 (index, bitmap, tileBankBrowser); } @@ -642,6 +652,8 @@ void TileList::clearTransition (int index, CTile::TBitmap bitmap) theListTransition[index].alphaLoaded=0; theListTransition[index].alphaBits.resize(0); break; + default: + break; } tileBankBrowser.getTileSet (_tileSet)->clearTransition ((CTileSet::TTransition)index, bitmap, tileBankBrowser); } @@ -660,6 +672,8 @@ void TileList::clearDisplacement (int index, CTile::TBitmap bitmap) case CTile::alpha: nlassert(0); break; + default: + break; } tileBankBrowser.getTileSet (_tileSet)->clearDisplacement ((CTileSet::TDisplacement)index, tileBankBrowser); @@ -717,7 +731,8 @@ void TileList::Reload(int first, int last, TileType n) //recharge en memoire une theList[n][i].Load (index, NULL); break; } - + default: + break; } } } diff --git a/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c b/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c index 332ee1b0d..53dc957f5 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/Pic_BMP.c @@ -31,7 +31,7 @@ typedef struct BMP_HEADER /* ---------------------------------------------------------------------------------------------------------------------------------- */ -unsigned long Pic_BMP_Write( unsigned char *FileName, +unsigned long Pic_BMP_Write( const char *FileName, unsigned char *pPal,unsigned char *pDatas, unsigned long w, unsigned long h, unsigned long d) diff --git a/code/nel/tools/3d/tile_edit_qt/pic/Pic_Manage.c b/code/nel/tools/3d/tile_edit_qt/pic/Pic_Manage.c index 6efaf0f03..ccc8cdc12 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/Pic_Manage.c +++ b/code/nel/tools/3d/tile_edit_qt/pic/Pic_Manage.c @@ -504,7 +504,7 @@ static char* ConvPic(PIC_PICTURE *pic, unsigned long type, char* pErr) /* ---------------------------------------- */ -unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, unsigned long qual) +unsigned long PIC_Save(unsigned long id, const char* FileName, unsigned long type, unsigned long qual) { PIC_PICTURE *pic; unsigned char err; diff --git a/code/nel/tools/3d/tile_edit_qt/pic/pic.h b/code/nel/tools/3d/tile_edit_qt/pic/pic.h index 761073552..cec5a0ff0 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/pic.h +++ b/code/nel/tools/3d/tile_edit_qt/pic/pic.h @@ -22,7 +22,7 @@ extern unsigned long PIC_Load(char* FileName, unsigned char Quantize); extern unsigned long PIC_Create(unsigned char* pPal, unsigned char* pDatas, unsigned long w, unsigned long h, unsigned long d); -extern unsigned long PIC_Save(unsigned long id, char* FileName, unsigned long type, unsigned long qual); +extern unsigned long PIC_Save(unsigned long id, const char* FileName, unsigned long type, unsigned long qual); extern unsigned long PIC_GetInfos( unsigned long id, unsigned char* *ppPal, unsigned char* *ppDatas, diff --git a/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h b/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h index 2ecd984b7..53166396d 100644 --- a/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h +++ b/code/nel/tools/3d/tile_edit_qt/pic/pic_private.h @@ -1,71 +1,71 @@ -#ifndef _PIC_PRIVATE_H_ -#define _PIC_PRIVATE_H_ -#ifdef __cplusplus -extern "C" { -#endif - -/* ---------------------------------------------------------------------------------------------------------------------------------- */ - -typedef struct PIC_PICTURE -{ - unsigned long ID; - unsigned long Width; - unsigned long Height; - unsigned long Depth; - unsigned char *pDatas; - unsigned char *pPal; - struct PIC_PICTURE *Next; -} PIC_PICTURE; - -/* ---------------------------------------------------------------------------------------------------------------------------------- */ - - -/* - * JPG - */ - - -extern unsigned long Pic_JPG_Read( unsigned char *FileName, - unsigned char **ppPal, unsigned char **ppDatas, - unsigned long *w, unsigned long *h); - -extern unsigned long Pic_JPG_Write( unsigned char *FileName, - unsigned long Qual, - unsigned char *pDatas, - unsigned long w, unsigned long h); -/* - * TGA - */ -extern unsigned long Pic_TGA_Read( unsigned char *FileName, - unsigned char **ppPal, unsigned char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth); -extern unsigned long Pic_TGA_Write( unsigned char *FileName, - unsigned char *pPal,unsigned char *pDatas, - unsigned long w, unsigned long h, unsigned long d); -/* - * BMP - */ -extern unsigned long Pic_BMP_Read( unsigned char *FileName, - unsigned char **ppPal, unsigned char **ppDatas, - unsigned long *pWidth, unsigned long *pHeight, - unsigned long *pDepth); - -extern unsigned long Pic_BMP_Write( unsigned char *FileName, - unsigned char *pPal,unsigned char *pDatas, - unsigned long w, unsigned long h, unsigned long d); -/* - * System - */ -extern void* Pic_malloc(unsigned long size); -extern void* Pic_calloc(unsigned long count, unsigned long size); -extern void Pic_free(void *memblock); -extern unsigned long Pic__msize(void *memblock); -extern void Pic_SetError(unsigned char *msg, ...); - -/* ---------------------------------------------------------------------------------------------------------------------------------- */ - -#ifdef __cplusplus -} -#endif +#ifndef _PIC_PRIVATE_H_ +#define _PIC_PRIVATE_H_ +#ifdef __cplusplus +extern "C" { +#endif + +/* ---------------------------------------------------------------------------------------------------------------------------------- */ + +typedef struct PIC_PICTURE +{ + unsigned long ID; + unsigned long Width; + unsigned long Height; + unsigned long Depth; + unsigned char *pDatas; + unsigned char *pPal; + struct PIC_PICTURE *Next; +} PIC_PICTURE; + +/* ---------------------------------------------------------------------------------------------------------------------------------- */ + + +/* + * JPG + */ + + +extern unsigned long Pic_JPG_Read( unsigned char *FileName, + unsigned char **ppPal, unsigned char **ppDatas, + unsigned long *w, unsigned long *h); + +extern unsigned long Pic_JPG_Write( unsigned char *FileName, + unsigned long Qual, + unsigned char *pDatas, + unsigned long w, unsigned long h); +/* + * TGA + */ +extern unsigned long Pic_TGA_Read( unsigned char *FileName, + unsigned char **ppPal, unsigned char **ppDatas, + unsigned long *pWidth, unsigned long *pHeight, + unsigned long *pDepth); +extern unsigned long Pic_TGA_Write( unsigned char *FileName, + unsigned char *pPal,unsigned char *pDatas, + unsigned long w, unsigned long h, unsigned long d); +/* + * BMP + */ +extern unsigned long Pic_BMP_Read( unsigned char *FileName, + unsigned char **ppPal, unsigned char **ppDatas, + unsigned long *pWidth, unsigned long *pHeight, + unsigned long *pDepth); + +extern unsigned long Pic_BMP_Write( const char *FileName, + unsigned char *pPal,unsigned char *pDatas, + unsigned long w, unsigned long h, unsigned long d); +/* + * System + */ +extern void* Pic_malloc(unsigned long size); +extern void* Pic_calloc(unsigned long count, unsigned long size); +extern void Pic_free(void *memblock); +extern unsigned long Pic__msize(void *memblock); +extern void Pic_SetError(unsigned char *msg, ...); + +/* ---------------------------------------------------------------------------------------------------------------------------------- */ + +#ifdef __cplusplus +} +#endif #endif diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 435698226..2f947e198 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -4522,7 +4522,7 @@ void CCharacterCL::applyBehaviourFlyingHPs(const CBehaviourContext &bc, const MB { if(behaviour.DeltaHP != 0) { - CRGBA deltaHPColor; + CRGBA deltaHPColor(0, 0, 0); // if it's a hit if( behaviour.DeltaHP < 0 ) { diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index bb2540824..ba6fc74f6 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -787,7 +787,6 @@ void prelogInit() CPath::remapExtension ("png", "tga", true); FPU_CHECKER_ONCE - uint i; addPreDataPaths(ProgressBar); FPU_CHECKER_ONCE @@ -1045,7 +1044,7 @@ void prelogInit() // Set the monitor color properties CMonitorColorProperties monitorColor; - for (i=0; i<3; i++) + for (uint i=0; i<3; i++) { monitorColor.Contrast[i] = ClientCfg.Contrast; monitorColor.Luminosity[i] = ClientCfg.Luminosity; diff --git a/code/ryzom/client/src/interface_v3/action_handler_help.cpp b/code/ryzom/client/src/interface_v3/action_handler_help.cpp index 4717cc8aa..10a814401 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1827,7 +1827,7 @@ void getSkillModVsType(CDBCtrlSheet *item, const CItemSheet*pIS, ucstring &itemT void getArmorBonus(CDBCtrlSheet *item, ucstring &itemText, const CItemSheet*pIS) { ucstring armor_bonus(""); - sint32 level; + sint32 level = 0; if (pIS->Armor.ArmorType == ARMORTYPE::HEAVY) level = item->getQuality(); @@ -3613,7 +3613,7 @@ public: uint8 index; fromString(Params, index); --index; // Param is 1-based so subtract 1 - if (index < 0 || index >= MAX_INVENTORY_ANIMAL) + if (index >= MAX_INVENTORY_ANIMAL) { return; } diff --git a/code/ryzom/client/src/interface_v3/animal_position_state.cpp b/code/ryzom/client/src/interface_v3/animal_position_state.cpp index d702a6226..074c1a556 100644 --- a/code/ryzom/client/src/interface_v3/animal_position_state.cpp +++ b/code/ryzom/client/src/interface_v3/animal_position_state.cpp @@ -255,7 +255,7 @@ void CAnimalPositionState::serial(NLMISC::IStream &f) // *************************************************************************** CEntityCL *CNamedEntityPositionState::getEntity() { - if (!dbOk()) return false; + if (!dbOk()) return NULL; return EntitiesMngr.getEntityByName(_Name->getValue32()); } diff --git a/code/ryzom/client/src/interface_v3/brick_learned_callback.h b/code/ryzom/client/src/interface_v3/brick_learned_callback.h index a0c9a4c48..8d8566443 100644 --- a/code/ryzom/client/src/interface_v3/brick_learned_callback.h +++ b/code/ryzom/client/src/interface_v3/brick_learned_callback.h @@ -30,6 +30,7 @@ class IBrickLearnedCallback { public: + virtual ~IBrickLearnedCallback() { } virtual void onBrickLearned() =0; }; diff --git a/code/ryzom/client/src/interface_v3/chat_window.h b/code/ryzom/client/src/interface_v3/chat_window.h index baf146f0a..ea68140b8 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.h +++ b/code/ryzom/client/src/interface_v3/chat_window.h @@ -153,7 +153,7 @@ protected: // ctor CChatWindow(); // dtor - ~CChatWindow(); + virtual ~CChatWindow(); protected: IChatWindowListener *_Listener; NLMISC::CRefPtr _Chat; diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 5b8a03d56..034214d3d 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -3221,7 +3221,7 @@ void CGroupHTML::handle () else { /* Add our own request terminate handler. Nb: pass as param a UID, not the ptr */ - HTNet_addAfter(requestTerminater, NULL, (void*)_GroupHtmlUID, HT_ALL, HT_FILTER_LAST); + HTNet_addAfter(requestTerminater, NULL, (void*)(size_t)_GroupHtmlUID, HT_ALL, HT_FILTER_LAST); /* Set the timeout for long we are going to wait for a response */ HTHost_setEventTimeout(60000); @@ -3367,7 +3367,7 @@ void CGroupHTML::handle () else { /* Add our own request terminate handler. Nb: pass as param a UID, not the ptr */ - HTNet_addAfter(requestTerminater, NULL, (void*)_GroupHtmlUID, HT_ALL, HT_FILTER_LAST); + HTNet_addAfter(requestTerminater, NULL, (void*)(size_t)_GroupHtmlUID, HT_ALL, HT_FILTER_LAST); /* Start the first request */ diff --git a/code/ryzom/client/src/interface_v3/group_menu.cpp b/code/ryzom/client/src/interface_v3/group_menu.cpp index 758225205..36dfaeebe 100644 --- a/code/ryzom/client/src/interface_v3/group_menu.cpp +++ b/code/ryzom/client/src/interface_v3/group_menu.cpp @@ -102,7 +102,7 @@ void CViewTextMenu::setAlpha (sint32 a) { OldShadowColor.A = OldColor.A = (uint8)a; OldShadowColorOver.A = OldColorOver.A = (uint8)a; - OldShadowColorGrayed.A = OldShadowColorGrayed.A = (uint8)a; + OldShadowColorGrayed.A = OldColorGrayed.A = (uint8)a; } // ------------------------------------------------------------------------------------------------ diff --git a/code/ryzom/client/src/interface_v3/interface_anim.h b/code/ryzom/client/src/interface_v3/interface_anim.h index abce8f41e..8401f88e4 100644 --- a/code/ryzom/client/src/interface_v3/interface_anim.h +++ b/code/ryzom/client/src/interface_v3/interface_anim.h @@ -37,7 +37,7 @@ class CInterfaceTrack public: CInterfaceTrack(); - ~CInterfaceTrack(); + virtual ~CInterfaceTrack(); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); @@ -90,7 +90,7 @@ class CInterfaceAnim public: CInterfaceAnim(); - ~CInterfaceAnim(); + virtual ~CInterfaceAnim(); virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); diff --git a/code/ryzom/client/src/interface_v3/interface_expr.cpp b/code/ryzom/client/src/interface_v3/interface_expr.cpp index 3f395e0b4..656c0f642 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr.cpp @@ -78,11 +78,11 @@ CInterfaceExprNode *CInterfaceExpr::buildExprTree(const std::string &expr) { std::string tempStr; formatLuaCall(expr, tempStr); - if (!buildExprTree(tempStr.c_str(), node)) return false; + if (buildExprTree(tempStr.c_str(), node) == NULL) return false; } else { - if (!buildExprTree(expr.c_str(), node)) return false; + if (buildExprTree(expr.c_str(), node) == NULL) return false; } return node; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h index 0de08d491..85ee99b67 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.h +++ b/code/ryzom/client/src/interface_v3/interface_manager.h @@ -222,6 +222,7 @@ public: class IStringProcess { public: + virtual ~IStringProcess() { } virtual bool cbIDStringReceived(ucstring &inOut) = 0; // called when string or id is received (return true if valid the change) }; diff --git a/code/ryzom/client/src/r2/dmc/dmc.h b/code/ryzom/client/src/r2/dmc/dmc.h index 1d6f9c121..9dca0e5fc 100644 --- a/code/ryzom/client/src/r2/dmc/dmc.h +++ b/code/ryzom/client/src/r2/dmc/dmc.h @@ -65,7 +65,7 @@ namespace R2 void loadFeatures(); - ~CDynamicMapClient(); + virtual ~CDynamicMapClient(); void loadDefaultPalette(); diff --git a/code/ryzom/common/src/game_share/ai_wrapper.h b/code/ryzom/common/src/game_share/ai_wrapper.h index a3a98c61a..c0bac40a2 100644 --- a/code/ryzom/common/src/game_share/ai_wrapper.h +++ b/code/ryzom/common/src/game_share/ai_wrapper.h @@ -47,6 +47,10 @@ namespace R2 class IAiWrapper { public: + virtual ~IAiWrapper() + { + } + virtual void init(NLLIGO::CLigoConfig * ligoConfig) { } diff --git a/code/ryzom/tools/assoc_mem/field.h b/code/ryzom/tools/assoc_mem/field.h index 25e201aa1..8ab8e52b4 100644 --- a/code/ryzom/tools/assoc_mem/field.h +++ b/code/ryzom/tools/assoc_mem/field.h @@ -32,7 +32,7 @@ class CField { public: CField(); CField(std::string); - ~CField(); + virtual ~CField(); virtual const std::vector &getPossibleValues() const; virtual void addPossibleValue(IValue *); virtual ICondNode *createNode(int, int, std::vector &) = 0; diff --git a/code/ryzom/tools/assoc_mem/node.h b/code/ryzom/tools/assoc_mem/node.h index e740c6fad..50efc7f4f 100644 --- a/code/ryzom/tools/assoc_mem/node.h +++ b/code/ryzom/tools/assoc_mem/node.h @@ -23,7 +23,7 @@ class INode { public: INode(); - ~INode(); + virtual ~INode(); virtual bool propagRecord(CRecord *) = 0; }; diff --git a/code/ryzom/tools/assoc_mem/record.h b/code/ryzom/tools/assoc_mem/record.h index 259ee6567..9310890cd 100644 --- a/code/ryzom/tools/assoc_mem/record.h +++ b/code/ryzom/tools/assoc_mem/record.h @@ -27,7 +27,7 @@ class CRecord { public: CRecord(); CRecord(std::vector &); - ~CRecord(); + virtual ~CRecord(); const std::vector &getValues(); void addValue(IValue *); void addValue(std::string &); diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp index 21c1e25ef..b16e0123c 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_model.cpp @@ -126,6 +126,8 @@ namespace NLQT } // end default } // end switch valueFrom } // end case nodeForm + default: + break; } // end switch nodeFrom return QVariant(); } diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.cpp index 68b990b30..0c4c5b7eb 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/georgesform_proxy_model.cpp @@ -79,6 +79,8 @@ namespace NLQT } } } + default: + break; } return true; } diff --git a/code/ryzom/tools/translation_tools/extract_bot_names.cpp b/code/ryzom/tools/translation_tools/extract_bot_names.cpp index e8198e63d..4c3268e1f 100644 --- a/code/ryzom/tools/translation_tools/extract_bot_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_bot_names.cpp @@ -507,7 +507,7 @@ int extractBotNames(int argc, char *argv[]) map::iterator first(SimpleNames.begin()), last(SimpleNames.end()); for (; first != last; ++first) { - uint rowIdx; + uint rowIdx = 0; if (!botNames.findRow(botIdCol, first->first, rowIdx)) { // we need to add the entry @@ -524,7 +524,7 @@ int extractBotNames(int argc, char *argv[]) { // set/update the sheet name info // try to restore the existing translation - uint transRowIdx; + uint transRowIdx = 0; if (transBotNames.findRow(transIdCol, first->first, transRowIdx)) { ucstring wkBotName = botNames.getData(rowIdx, ucstring("bot name"));