From dee391151a9bed0ff11ab2ea5302d799abd436fb Mon Sep 17 00:00:00 2001 From: vl Date: Tue, 13 Jul 2010 11:05:21 +0200 Subject: [PATCH] Fixed: some gcc warning --- .../ryzom/client/src/interface_v3/action_handler_help.cpp | 4 ++-- code/ryzom/client/src/interface_v3/group_html.cpp | 2 +- code/ryzom/client/src/interface_v3/interface_parser.cpp | 8 ++++---- code/ryzom/client/src/interface_v3/lua_ihm.cpp | 2 +- code/ryzom/client/src/user_entity.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) 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 23c9982c0..4a386fd5e 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_help.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_help.cpp @@ -1274,10 +1274,10 @@ void getDamageText(CDBCtrlSheet *item, const CItemSheet*pIS, ucstring &itemText, string strMod; if(displayAsMod) - strMod= itemInfo.CurrentDamage>=0?"+":""; + strMod= "+"; strFindReplace(itemText, "%dmg", strMod + toString(itemInfo.CurrentDamage)); if(displayAsMod) - strMod= itemInfo.MaxDamage>=0?"+":""; + strMod= "+"; strFindReplace(itemText, "%max_dmg", strMod + toString(itemInfo.MaxDamage)); if(pIS->Family!=ITEMFAMILY::AMMO) diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 48becda66..fb8c9c268 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -2473,7 +2473,7 @@ void CGroupHTML::setTitle (const ucstring &title) CInterfaceElement *parent = getParent(); if (parent) { - if (parent = parent->getParent()) + if ((parent = parent->getParent())) { CGroupContainer *container = dynamic_cast(parent); if (container) diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index b5121fa2c..bab15a8f5 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -3391,7 +3391,7 @@ bool CInterfaceParser::parseActionCategory(xmlNodePtr cur) nlwarning(" cannot create instance from template"); } } - while(instanceNode = CIXml::getNextChildNode(instanceNode, "instance")); + while((instanceNode = CIXml::getNextChildNode(instanceNode, "instance"))); } parameter.Values.resize (CIXml::countChildren(paramNode, "value")); @@ -3422,18 +3422,18 @@ bool CInterfaceParser::parseActionCategory(xmlNodePtr cur) valueIndex++; } - while(valueNode = CIXml::getNextChildNode(valueNode, "value")); + while((valueNode = CIXml::getNextChildNode(valueNode, "value"))); } parameterIndex++; } - while(paramNode = CIXml::getNextChildNode(paramNode, "parameter")); + while((paramNode = CIXml::getNextChildNode(paramNode, "parameter"))); } // Next action actionIndex++; } - while(actionNode = CIXml::getNextChildNode(actionNode, "action")); + while((actionNode = CIXml::getNextChildNode(actionNode, "action"))); } // Add this category to the action manager diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.cpp b/code/ryzom/client/src/interface_v3/lua_ihm.cpp index 88ae99cbb..07e692fef 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm.cpp @@ -617,7 +617,7 @@ int CLuaIHM::luaMethodCall(lua_State *ls) // state->remove(1); // remove 'self' reference from parameters stack // - int numResults; + int numResults = 0; int initialStackSize = state->getTop(); try { diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 1258512d8..7b6e6428f 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -456,7 +456,7 @@ void CUserEntity::updateVisualPropertyBehaviour(const NLMISC::TGameCycle &/* gam bc.BehavTime = TimeInSec; if(VerboseAnimUser) { - nlinfo("UE::updateVPBeha: '%d(%s)'.", bc.Behav.Behaviour, MBEHAV::behaviourToString(bc.Behav.Behaviour).c_str()); + nlinfo("UE::updateVPBeha: '%d(%s)'.", (int)bc.Behav.Behaviour, MBEHAV::behaviourToString(bc.Behav.Behaviour).c_str()); } CCDBNodeLeaf *targetList0 = dynamic_cast(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_0)); CCDBNodeLeaf *targetList1 = dynamic_cast(_DBEntry->getNode(CLFECOMMON::PROPERTY_TARGET_LIST_1));