From 3834cb6f8ae768a58b3b718eff5ae670a0c299f5 Mon Sep 17 00:00:00 2001
From: Graham Madarasz <graham@lindenlab.com>
Date: Fri, 26 Apr 2013 09:02:31 -0700
Subject: [PATCH] Fix linux breakage from sunshine merge

---
 indra/lscript/lscript_compile/indra.l | 6 ++++++
 indra/lscript/lscript_compile/indra.y | 5 +++++
 indra/newview/llpanelface.cpp         | 1 -
 indra/newview/pipeline.cpp            | 5 +----
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index b2c49083cb2..9132d5d5289 100755
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -79,11 +79,17 @@ void parse_string();
 #define yyfree indra_free
 
 
+#if LL_WINDOWS
 #if defined(__cplusplus)
 extern "C" { int yylex( void ); }
 extern "C" { int yyparse( void ); }
 extern "C" { int yyerror(const char *fmt, ...); }
 #endif
+#else
+int yylex( void );
+int yyparse( void );
+int yyerror(const char *fmt, ...);
+#endif
 
 %}
 
diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y
index e4b10ffdd9d..9c2ed02f728 100755
--- a/indra/lscript/lscript_compile/indra.y
+++ b/indra/lscript/lscript_compile/indra.y
@@ -2,8 +2,10 @@
 	#include "linden_common.h"
 	#include "lscript_tree.h"
 
+    #if LL_WINDOWS
     #ifdef __cplusplus
     extern "C" {
+    #endif
     #endif
 
 	int yylex(void);
@@ -20,9 +22,12 @@
 	#pragma warning( disable : 4065 )	// warning: switch statement contains 'default' but no 'case' labels
 	#endif
 
+    #if LL_WINDOWS
     #ifdef __cplusplus
     }
     #endif
+    #endif
+
 %}
 
 %union
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index a82232101e2..d106de3d739 100755
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -120,7 +120,6 @@ BOOL	LLPanelFace::postBuild()
 	childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterial, this);
 	childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
 
-	LLRect	rect = this->getRect();
 	LLTextureCtrl*	mTextureCtrl;
 	LLTextureCtrl*	mShinyTextureCtrl;
 	LLTextureCtrl*	mBumpyTextureCtrl;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bc2d28e4b1e..b7dd11e78d9 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -9316,9 +9316,6 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
 		3,7	
 	};
 
-	LLVector3 center = (max+min)*0.5f;
-	LLVector3 size = (max-min)*0.5f;
-	
 	for (U32 i = 0; i < 12; i++)
 	{
 		for (U32 j = 0; j < 6; ++j)
@@ -9560,7 +9557,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
 	mSunOrthoClipPlanes = LLVector4(clip, clip.mV[2]*clip.mV[2]/clip.mV[1]);
 
 	//currently used for amount to extrude frusta corners for constructing shadow frusta
-	LLVector3 n = RenderShadowNearDist;
+	//LLVector3 n = RenderShadowNearDist;
 	//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
 
 	//put together a universal "near clip" plane for shadow frusta
-- 
GitLab