From e59757e3e8f6bdf9d77c995868cfb7557d599a77 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Wed, 20 Aug 2014 19:43:32 -0500 Subject: [PATCH] Clean up a few harmless compiler warnings (signed/unsigned, double to float) --- indra/llmath/llmath.h | 2 +- indra/llmessage/aicurlperservice.cpp | 2 +- indra/newview/lldrawpoolalpha.cpp | 2 +- indra/newview/llfloaterregionrestarting.cpp | 8 ++++---- indra/newview/llviewerjoystick.cpp | 2 +- indra/newview/llviewertexture.cpp | 8 ++++---- indra/newview/pipeline.cpp | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 998b78750..2908405ea 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -78,7 +78,7 @@ const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f; const F32 RAD_TO_DEG = 57.295779513082320876798154814105f; const F32 F_APPROXIMATELY_ZERO = 0.00001f; const F32 F_LN10 = 2.3025850929940456840179914546844f; -const F32 OO_LN10 = 0.43429448190325182765112891891661; +const F32 OO_LN10 = 0.43429448190325182765112891891661f; const F32 F_LN2 = 0.69314718056f; const F32 OO_LN2 = 1.4426950408889634073599246810019f; diff --git a/indra/llmessage/aicurlperservice.cpp b/indra/llmessage/aicurlperservice.cpp index 570a7e5b2..fb8427da4 100644 --- a/indra/llmessage/aicurlperservice.cpp +++ b/indra/llmessage/aicurlperservice.cpp @@ -610,7 +610,7 @@ void AIPerService::purge(void) per_service_w->mCapabilityType[i].mQueuedRequests.clear(); if (is_approved((AICapabilityType)i)) { - llassert(total_queued_w->approved >= s); + llassert(total_queued_w->approved >= (S32)s); total_queued_w->approved -= s; } } diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 2e2bf3aac..99e8c20ef 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -281,7 +281,7 @@ void LLDrawPoolAlpha::render(S32 pass) gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); } - gGL.diffuseColor4f(0.9,0,0,0.4); + gGL.diffuseColor4f(0.9f,0.f,0.f,0.4f); LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f); gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ; diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 84e5ea934..a5eeeeecc 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -154,10 +154,10 @@ void LLFloaterRegionRestarting::draw() if (!alchemyRegionShake || isMinimized()) // If we're minimized, leave the user alone return; - const F32 SHAKE_INTERVAL = 0.025; - const F32 SHAKE_TOTAL_DURATION = 1.8; // the length of the default alert tone for this - const F32 SHAKE_INITIAL_MAGNITUDE = 1.5; - const F32 SHAKE_HORIZONTAL_BIAS = 0.25; + const F32 SHAKE_INTERVAL = 0.025f; + const F32 SHAKE_TOTAL_DURATION = 1.8f; // the length of the default alert tone for this + const F32 SHAKE_INITIAL_MAGNITUDE = 1.5f; + const F32 SHAKE_HORIZONTAL_BIAS = 0.25f; F32 time_shaking; if (SHAKE_START == sShakeState) diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index f5af5683a..4971d52be 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -579,7 +579,7 @@ void LLViewerJoystick::cursorSlide(F32 inc) void LLViewerJoystick::cursorPush(F32 inc) { static F32 prev_inc = 0.f; // Smooth a little. - if (!is_approx_zero(0.001)) + if (!is_approx_zero(0.001f)) { S32 x, y; LLUI::getMousePositionScreen(&x, &y); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index c49be918a..6f41b62f8 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -757,8 +757,8 @@ void LLViewerTexture::removeFace(U32 ch, LLFace* facep) if(mNumFaces[ch] > 1) { S32 index = facep->getIndexInTex(ch) ; - llassert(index < mFaceList[ch].size()); - llassert(index < mNumFaces[ch]); + llassert(index < (S32)mFaceList[ch].size()); + llassert(index < (S32)mNumFaces[ch]); mFaceList[ch][index] = mFaceList[ch][--mNumFaces[ch]] ; mFaceList[ch][index]->setIndexInTex(ch, index) ; } @@ -808,8 +808,8 @@ void LLViewerTexture::removeVolume(LLVOVolume* volumep) if(mNumVolumes > 1) { S32 index = volumep->getIndexInTex() ; - llassert(index < mVolumeList.size()); - llassert(index < mNumVolumes); + llassert(index < (S32)mVolumeList.size()); + llassert(index < (S32)mNumVolumes); mVolumeList[index] = mVolumeList[--mNumVolumes] ; mVolumeList[index]->setIndexInTex(index) ; } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7af2dc21e..3afd7bc47 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7324,9 +7324,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (!LLViewerCamera::getInstance()->cameraUnderWater()) { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2f); } else { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0f); } shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF); @@ -7362,9 +7362,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (!LLViewerCamera::getInstance()->cameraUnderWater()) { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 2.2f); } else { - shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0); + shader->uniform1f(LLShaderMgr::GLOBAL_GAMMA, 1.0f); } drawFullScreenRect(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0);