From 957156586cb11a8a0f21e973f7eeedbe290987bc Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 21 Aug 2010 15:57:55 +0200 Subject: [PATCH] Changed: #825 Remove all warnings when compiling Ryzom --- code/nel/samples/net/udp/receive_task.h | 4 ++-- code/nel/src/3d/patch_lightmap.cpp | 5 +++++ code/nel/src/3d/patchuv_locator.cpp | 4 ++-- code/nel/src/3d/vegetable_manager.cpp | 4 ++++ code/nel/src/3d/zone_lighter.cpp | 12 ++++++------ 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/code/nel/samples/net/udp/receive_task.h b/code/nel/samples/net/udp/receive_task.h index 4d58483bf..1bebc3308 100644 --- a/code/nel/samples/net/udp/receive_task.h +++ b/code/nel/samples/net/udp/receive_task.h @@ -53,7 +53,7 @@ struct TReceivedMessage void vectorToAddress(); /// Set "disconnection" message for the current AddrFrom - void setTypeEvent( TEventType t ) { *_Data.begin() = t; } + void setTypeEvent( TEventType t ) { *_Data.begin() = (uint8)t; } void setDate() { *(sint64*)&(*(_Data.begin()+1)) = NLMISC::CTime::getLocalTime(); } @@ -69,7 +69,7 @@ struct TReceivedMessage const uint8 *userDataR() const { return &*_Data.begin() + MsgHeaderSize; } /// Return the size of user data - uint32 userSize() { return _Data.size() - MsgHeaderSize; } + uint32 userSize() { return (uint32)_Data.size() - MsgHeaderSize; } /// Return the data vector (event type header byte + user data) vector& data() { return _Data; } diff --git a/code/nel/src/3d/patch_lightmap.cpp b/code/nel/src/3d/patch_lightmap.cpp index b5a6c8f8d..bd3886a71 100644 --- a/code/nel/src/3d/patch_lightmap.cpp +++ b/code/nel/src/3d/patch_lightmap.cpp @@ -1671,14 +1671,19 @@ void CPatch::getCurrentTileTLIColors(uint ts, uint tt, NLMISC::CRGBA corners[4] CRGBA tbMiddle; // left. tbEdges[0].avg2RGBOnly(tbCorners[0], tbCorners[2]); + tbEdges[0].A = 255; // bottom tbEdges[1].avg2RGBOnly(tbCorners[2], tbCorners[3]); + tbEdges[1].A = 255; // right tbEdges[2].avg2RGBOnly(tbCorners[1], tbCorners[3]); + tbEdges[2].A = 255; // up tbEdges[3].avg2RGBOnly(tbCorners[0], tbCorners[1]); + tbEdges[3].A = 255; // middle. tbMiddle.avg2RGBOnly(tbEdges[0], tbEdges[2]); + tbMiddle.A = 255; // just copy result according to tile pos in tessBlock. if(tlt==0) diff --git a/code/nel/src/3d/patchuv_locator.cpp b/code/nel/src/3d/patchuv_locator.cpp index 8608fd137..b42716e80 100644 --- a/code/nel/src/3d/patchuv_locator.cpp +++ b/code/nel/src/3d/patchuv_locator.cpp @@ -106,8 +106,8 @@ void CPatchUVLocator::build(const CPatch *patchCenter, sint edgeCenter, CPatch:: // Find the position. //============================= // Find the uv coord at start of the edge, for 2 patchs. - CVector2f uvCenter; - CVector2f uvNeighbor; + CVector2f uvCenter(0.f, 0.f); + CVector2f uvNeighbor(0.f, 0.f); float decal; // find the uv at start of edgeCenter, + decal due to bind 1/X. diff --git a/code/nel/src/3d/vegetable_manager.cpp b/code/nel/src/3d/vegetable_manager.cpp index 656f99dfe..bb472e75a 100644 --- a/code/nel/src/3d/vegetable_manager.cpp +++ b/code/nel/src/3d/vegetable_manager.cpp @@ -1121,6 +1121,8 @@ void CVegetableManager::addInstance(CVegetableInstanceGroup *ig, CVegetableLightEx &vegetLex= ig->VegetableLightEx; // Color of pointLights modulated by diffuse. CRGBA diffusePL[2]; + diffusePL[0] = CRGBA::Black; + diffusePL[1] = CRGBA::Black; if(vegetLex.NumLights>=1) { diffusePL[0].modulateFromColorRGBOnly(diffuseRGBA, vegetLex.Color[0]); @@ -2491,6 +2493,8 @@ uint CVegetableManager::updateInstanceLighting(CVegetableInstanceGroup *ig, uin CVegetableLightEx &vegetLex= ig->VegetableLightEx; // Color of pointLights modulated by diffuse. CRGBA diffusePL[2]; + diffusePL[0] = CRGBA::Black; + diffusePL[1] = CRGBA::Black; if(vegetLex.NumLights>=1) { diffusePL[0].modulateFromColorRGBOnly(vegetLI.MatDiffuse, vegetLex.Color[0]); diff --git a/code/nel/src/3d/zone_lighter.cpp b/code/nel/src/3d/zone_lighter.cpp index 57cba49a8..5a8757605 100644 --- a/code/nel/src/3d/zone_lighter.cpp +++ b/code/nel/src/3d/zone_lighter.cpp @@ -1732,8 +1732,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2])); // UV - float u[3]; - float v[3]; + float u[3] = { 0.f }; + float v[3] = { 0.f }; for (uint i=0; i<3; i++) { // Get UV coordinates @@ -1764,8 +1764,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshGeom &mes CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2])); // UV - float u[3]; - float v[3]; + float u[3] = { 0.f }; + float v[3] = { 0.f }; for (uint i=0; i<3; i++) { // Get UV coordinates @@ -1898,8 +1898,8 @@ void CZoneLighter::addTriangles (const CMeshBase &meshBase, const CMeshMRMGeom & CVector v2=modelMT*(*vba.getVertexCoordPointer (triIndex[tri*3+2])); // UV - float u[3]; - float v[3]; + float u[3] = { 0.f }; + float v[3] = { 0.f }; for (uint i=0; i<3; i++) { // Get UV coordinates