From b7feea6c959c90605d4b99f6fbda7c294be6fb20 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 13 Nov 2013 21:40:41 +0100 Subject: [PATCH] Fixed: Warning with clang --- .../nel/src/3d/driver/opengl/driver_opengl_uniform.cpp | 4 ++-- code/nel/src/gui/interface_element.cpp | 10 ++-------- code/nel/src/net/buf_server.cpp | 7 ------- code/ryzom/client/src/interface_v3/character_3d.cpp | 2 +- .../ryzom/client/src/interface_v3/group_quick_help.cpp | 2 +- code/ryzom/client/src/main_loop.cpp | 1 - code/ryzom/client/src/timed_fx_manager.cpp | 2 +- code/ryzom/common/src/game_share/cst_loader.h | 2 ++ 8 files changed, 9 insertions(+), 21 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp index 9b0447dc5..43ab3a85a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_uniform.cpp @@ -488,9 +488,9 @@ void CDriverGL::setUniformParams(TProgram program, CGPUProgramParams ¶ms) if (index == ~0) { const std::string &name = params.getNameByOffset(offset); - nlassert(!name.empty() /* missing both parameter name and index, code error /); + nlassert(!name.empty()); // missing both parameter name and index, code error uint index = prog->getUniformIndex(name.c_str()); - nlassert(index != ~0 /* invalid parameter name /); + nlassert(index != ~0); // invalid parameter name params.map(index, name); } diff --git a/code/nel/src/gui/interface_element.cpp b/code/nel/src/gui/interface_element.cpp index 759ce5f35..c7a0c234b 100644 --- a/code/nel/src/gui/interface_element.cpp +++ b/code/nel/src/gui/interface_element.cpp @@ -876,38 +876,32 @@ namespace NLGUI { case Hotspot_TL: return "TL"; - break; case Hotspot_TM: return "TM"; - break; case Hotspot_TR: return "TR"; - break; case Hotspot_ML: return "ML"; - break; case Hotspot_MM: return "MM"; - break; case Hotspot_MR: return "MR"; - break; case Hotspot_BL: return "BL"; - break; case Hotspot_BM: return "BM"; - break; case Hotspot_BR: return "BR"; + + default: break; } diff --git a/code/nel/src/net/buf_server.cpp b/code/nel/src/net/buf_server.cpp index eeb356454..44c966e11 100644 --- a/code/nel/src/net/buf_server.cpp +++ b/code/nel/src/net/buf_server.cpp @@ -517,13 +517,6 @@ void CBufServer::receive( CMemStream& buffer, TSockId* phostid ) *phostid = *((TSockId*)&(buffer.buffer()[buffer.size()-sizeof(TSockId)-1])); nlassert( buffer.buffer()[buffer.size()-1] == CBufNetBase::User ); - // debug features, we number all packet to be sure that they are all sent and received - // \todo remove this debug feature when ok -#ifdef NL_BIG_ENDIAN - uint32 val = NLMISC_BSWAP32(*(uint32*)buffer.buffer()); -#else - uint32 val = *(uint32*)buffer.buffer(); -#endif buffer.resize( buffer.size()-sizeof(TSockId)-1 ); // TODO OPTIM remove the nldebug for speed diff --git a/code/ryzom/client/src/interface_v3/character_3d.cpp b/code/ryzom/client/src/interface_v3/character_3d.cpp index fca3dcb8f..c76407f11 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.cpp +++ b/code/ryzom/client/src/interface_v3/character_3d.cpp @@ -564,7 +564,7 @@ CCharacter3D::CCharacter3D() _CurrentSetup.ArmsWidth = _CurrentSetup.LegsWidth = _CurrentSetup.BreastSize = -20.0f; _PelvisPos.set(0.f,0.f,-20.0f); _CurPosX = _CurPosY = _CurPosZ = 0.0f; - _CurRotX, _CurRotY, _CurRotZ = 0.0f; + _CurRotX = _CurRotY = _CurRotZ = 0.0f; _NextBlinkTime = 0; _CopyAnim=false; } diff --git a/code/ryzom/client/src/interface_v3/group_quick_help.cpp b/code/ryzom/client/src/interface_v3/group_quick_help.cpp index 8990d46d8..d2444d413 100644 --- a/code/ryzom/client/src/interface_v3/group_quick_help.cpp +++ b/code/ryzom/client/src/interface_v3/group_quick_help.cpp @@ -163,7 +163,7 @@ void CGroupQuickHelp::setGroupTextSize (CInterfaceGroup *group, bool selected) { bool globalColor = selected ? TextColorGlobalColor : _NonSelectedGlobalColor; bool linkGlobalColor = selected ? LinkColorGlobalColor : _NonSelectedGlobalColor; - uint fontSize = selected ? TextFontSize : _NonSelectedSize;_NonSelectedSize; + uint fontSize = selected ? TextFontSize : _NonSelectedSize; NLMISC::CRGBA color = selected ? TextColor : _NonSelectedColor; NLMISC::CRGBA linkColor = selected ? LinkColor : _NonSelectedLinkColor; diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index 01336402d..4547ea591 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -997,7 +997,6 @@ bool mainLoop() // Init GameContextMenu. - GameContextMenu; GameContextMenu.init(""); // Active inputs diff --git a/code/ryzom/client/src/timed_fx_manager.cpp b/code/ryzom/client/src/timed_fx_manager.cpp index 89b71974f..9f7f40caf 100644 --- a/code/ryzom/client/src/timed_fx_manager.cpp +++ b/code/ryzom/client/src/timed_fx_manager.cpp @@ -1100,7 +1100,7 @@ void CTimedFXManager::setMaxNumFXInstances(uint maxNumInstances) FPU_CHECKER H_AUTO_USE(RZ_TimedFX) _MaxNumberOfFXInstances = maxNumInstances; - _CandidateFXListTouched; + _CandidateFXListTouched = true; } // ******************************************************************************************* diff --git a/code/ryzom/common/src/game_share/cst_loader.h b/code/ryzom/common/src/game_share/cst_loader.h index d74464fe9..b80cad107 100644 --- a/code/ryzom/common/src/game_share/cst_loader.h +++ b/code/ryzom/common/src/game_share/cst_loader.h @@ -158,6 +158,8 @@ public: case FLOAT : fromString((*itt).second, value); break; + default: + break; } }