From 254fbd69a65ccbdfbf3678f1f99bda292b4cfc59 Mon Sep 17 00:00:00 2001
From: Nicky <sl.nicky.ml@googlemail.com>
Date: Wed, 1 Jun 2016 22:30:12 +0200
Subject: [PATCH] GCC compile fix, array initialization needs proper type.

---
 indra/newview/llsurfacepatch.cpp | 4 ++--
 indra/newview/llworld.cpp        | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 2d06b8599c2..d28a7cc0488 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -230,8 +230,8 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
 	const F32 xyScaleInv = (1.f / xyScale)*(0.2222222222f);
 
 	F32 vec[3] = {
-					fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f),
-					fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f),
+                    (F32)fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f),
+                    (F32)fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f),
 					0.f
 				};
 	F32 rand_val = llclamp(noise2(vec)* 0.75f + 0.5f, 0.f, 1.f);
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 11d3706821f..cee47a591e3 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -957,10 +957,10 @@ void LLWorld::updateWaterObjects()
 	center_y = min_y + (wy >> 1);
 
 	S32 add_boundary[4] = {
-		512 - (max_x - region_x),
-		512 - (max_y - region_y),
-		512 - (region_x - min_x),
-		512 - (region_y - min_y) };
+		(S32)(512 - (max_x - region_x)),
+		(S32)(512 - (max_y - region_y)),
+		(S32)(512 - (region_x - min_x)),
+		(S32)(512 - (region_y - min_y)) };
 		
 	S32 dir;
 	for (dir = 0; dir < 8; dir++)
-- 
GitLab