diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index c43ca2ba187bb9a109a0de6685de89a4f2b7f8b5..f43df3753a52e33f4270bfceac954464f140ef62 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -76,8 +76,8 @@ struct LLUnit
 	typedef STORAGE_TYPE storage_t;
 
 	// default initialization
-	LLUnit()
-	:	mValue(storage_t())
+	LLUnit(storage_t value = storage_t())
+	:	mValue(value)
 	{}
 
 	// unit initialization and conversion
@@ -85,12 +85,6 @@ struct LLUnit
 	LLUnit(LLUnit<OTHER_UNIT, OTHER_STORAGE> other)
 	:	mValue(convert(other))
 	{}
-
-	// value initialization
-	template<typename CONVERTABLE_TYPE>
-	LLUnit(CONVERTABLE_TYPE value)
-	: mValue(value)
-	{}
 	
 	// value assignment
 	self_t& operator = (storage_t value)
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 077c9f43a4833829c839427cc2deeba7f6bde25d..136a4d0a9e5640b65079c3ed6b420ed31b4c65fb 100755
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -394,7 +394,7 @@ void update_statistics()
 		static LLFrameTimer texture_stats_timer;
 		if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq)
 		{
-			gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value();
+			gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT));
 			texture_stats_timer.reset();
 		}
 	}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 1ffa83c5296f264edc91ee7a78e7fd898d5b3c04..7a142b481f91ea9b6d544d4a70c4f58cddb87b4d 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -533,7 +533,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
 		sTotalTextureMemory >= sMaxTotalTextureMem)
 	{
 		//when texture memory overflows, lower down the threshold to release the textures more aggressively.
-		sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<LLUnits::Bytes, S32>(gMaxVideoRam));
+		sMaxDesiredTextureMem = (S32)llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<LLUnits::Bytes, S32>(gMaxVideoRam));
 	
 		// If we are using more texture memory than we should,
 		// scale up the desired discard level
@@ -549,8 +549,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
 		sEvaluationTimer.reset();
 	}
 	else if (sDesiredDiscardBias > 0.0f &&
-			 sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale &&
-			 sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale)
+			 sBoundTextureMemory < (S32)(sMaxBoundTextureMem * texmem_lower_bound_scale) &&
+			 sTotalTextureMemory < (S32)(sMaxTotalTextureMem * texmem_lower_bound_scale))
 	{			 
 		// If we are using less texture memory than we should,
 		// scale down the desired discard level
@@ -568,8 +568,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
 	sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1);
 	sCameraMovingDiscardBias = (S8)(sCameraMovingBias);
 
-	LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) &&
-				(sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale) ;
+	LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < (S32)(0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale)) &&
+				(sTotalTextureMemory < (S32)(0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale));
 }
 
 //end of static functions