From c294c7c4740e41c43b2b04f136cc909e37b28f7d Mon Sep 17 00:00:00 2001
From: merov <none@none>
Date: Sat, 16 Mar 2013 16:09:50 -0700
Subject: [PATCH] CHUI-863 : Clean up dead code that's creating failures on
 gcc-4.6 builds on Linux

---
 indra/llrender/llgl.cpp           | 9 +--------
 indra/llui/lltextbase.cpp         | 1 -
 indra/newview/llchiclet.cpp       | 3 +++
 indra/newview/llviewerdisplay.cpp | 1 -
 indra/newview/llviewerwindow.cpp  | 2 --
 indra/newview/llworldmapview.cpp  | 3 ---
 6 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 9e4857b6bca..c8cf3713aba 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -597,11 +597,6 @@ bool LLGLManager::initGL()
 	if (mGLVendor.substr(0,4) == "ATI ")
 	{
 		mGLVendorShort = "ATI";
-		BOOL mobile = FALSE;
-		if (mGLRenderer.find("MOBILITY") != std::string::npos)
-		{
-			mobile = TRUE;
-		}
 		mIsATI = TRUE;
 
 #if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -1489,9 +1484,7 @@ void assert_glerror()
 
 void clear_glerror()
 {
-	//  Create or update texture to be used with this data 
-	GLenum error;
-	error = glGetError();
+	glGetError();
 }
 
 ///////////////////////////////////////////////////////////////
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index c4ec1edc737..ebc9ee244e7 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -359,7 +359,6 @@ void LLTextBase::drawSelectionBackground()
 
 		S32 selection_left		= llmin( mSelectionStart, mSelectionEnd );
 		S32 selection_right		= llmax( mSelectionStart, mSelectionEnd );
-		LLRect selection_rect = mVisibleTextRect;
 
 		// Skip through the lines we aren't drawing.
 		LLRect content_display_rect = getVisibleDocumentRect();
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3dbb43c6574..b221daf9365 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -427,6 +427,8 @@ LLChicletPanel::~LLChicletPanel()
 
 void LLChicletPanel::onMessageCountChanged(const LLSD& data)
 {
+    // *TODO : we either suppress this method or return a value. Right now, it servers no purpose.
+    /*
 	LLUUID session_id = data["session_id"].asUUID();
 	S32 unread = data["participant_unread"].asInteger();
 
@@ -435,6 +437,7 @@ void LLChicletPanel::onMessageCountChanged(const LLSD& data)
 	{
 		unread = 0;
 	}
+    */
 }
 
 void LLChicletPanel::objectChicletCallback(const LLSD& data)
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index ffeea2f4df9..40577118ba7 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1038,7 +1038,6 @@ void render_hud_attachments()
 	if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices())
 	{
 		LLCamera hud_cam = *LLViewerCamera::getInstance();
-		LLVector3 origin = hud_cam.getOrigin();
 		hud_cam.setOrigin(-1.f,0,0);
 		hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1));
 		LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e44a2cc4df0..4afd90b44c0 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2827,7 +2827,6 @@ void LLViewerWindow::updateUI()
 
 	BOOL handled = FALSE;
 
-	BOOL handled_by_top_ctrl = FALSE;
 	LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl();
 	LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture();
 	LLView* captor_view = dynamic_cast<LLView*>(mouse_captor);
@@ -3012,7 +3011,6 @@ void LLViewerWindow::updateUI()
 				S32 local_x, local_y;
 				top_ctrl->screenPointToLocal( x, y, &local_x, &local_y );
 				handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleHover(local_x, local_y, mask);
-				handled_by_top_ctrl = TRUE;
 			}
 
 			if ( !handled )
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index ccc513b80d6..11b2770ec00 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -965,8 +965,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
 	S32 text_x = x;
 	S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight());
 
-	BOOL is_in_window = true;
-
 	if(    x < 0 
 		|| y < 0 
 		|| x >= getRect().getWidth() 
@@ -979,7 +977,6 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
 			text_x = sTrackingArrowX;
 			text_y = sTrackingArrowY;
 		}
-		is_in_window = false;
 	}
 	else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION &&
 		LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING)
-- 
GitLab