diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 9e4857b6bca5b864e1f3a060df7d6148dde09e6f..87f81e05ee68a07566814383a36da6827768eca2 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -597,11 +597,11 @@ bool LLGLManager::initGL()
 	if (mGLVendor.substr(0,4) == "ATI ")
 	{
 		mGLVendorShort = "ATI";
-		BOOL mobile = FALSE;
-		if (mGLRenderer.find("MOBILITY") != std::string::npos)
-		{
-			mobile = TRUE;
-		}
+		//BOOL mobile = FALSE;
+		//if (mGLRenderer.find("MOBILITY") != std::string::npos)
+		//{
+		//	mobile = TRUE;
+		//}
 		mIsATI = TRUE;
 
 #if LL_WINDOWS && !LL_MESA_HEADLESS
@@ -1490,8 +1490,9 @@ void assert_glerror()
 void clear_glerror()
 {
 	//  Create or update texture to be used with this data 
-	GLenum error;
-	error = glGetError();
+	//GLenum error;
+	//error = glGetError();
+	glGetError();
 }
 
 ///////////////////////////////////////////////////////////////
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index e22b806a74665b04c582c33b06ebd88b7aca484b..49f0cb7dc8e8bd675d07f66b443a35ce4ef57911 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -380,7 +380,7 @@ void LLTextBase::drawSelectionBackground()
 				S32 segment_offset;
 				getSegmentAndOffset(line_iter->mDocIndexStart, &segment_iter, &segment_offset);
 				
-				LLRect selection_rect;
+				//LLRect selection_rect;
 				selection_rect.mLeft = line_iter->mRect.mLeft;
 				selection_rect.mRight = line_iter->mRect.mLeft;
 				selection_rect.mBottom = line_iter->mRect.mBottom;
@@ -443,7 +443,8 @@ void LLTextBase::drawSelectionBackground()
 			rect_it != selection_rects.end();
 			++rect_it)
 		{
-			LLRect selection_rect = *rect_it;
+			//LLRect selection_rect = *rect_it;
+			selection_rect = *rect_it;
 			selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom);
 			gl_rect_2d(selection_rect, selection_color);
 		}
@@ -2329,7 +2330,7 @@ const LLWString& LLTextBase::getWText() const
 S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, bool hit_past_end_of_line) const
 {
 	// Figure out which line we're nearest to.
-	LLRect visible_region = getVisibleDocumentRect();
+	//LLRect visible_region = getVisibleDocumentRect();
 	LLRect doc_rect = mDocumentView->getRect();
 
 	S32 doc_y = local_y - doc_rect.mBottom;
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index 83831e47996b36bf1ad555b65798c62881dd39e3..0a0e0e164ec830191b912707ee8d37e169ec7827 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -343,10 +343,11 @@ class LLRegisterWith
 
 	// this avoids a MSVC bug where non-referenced static members are "optimized" away
 	// even if their constructors have side effects
-	void reference()
+	S32 reference()
 	{
 		S32 dummy;
 		dummy = 0;
+		return dummy;
 	}
 };
 
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 3dbb43c657407c8b559d8ae68c2dd742ee6affca..e34130aff2d8a05f7935a57333c6f6aadcece07d 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -427,14 +427,14 @@ LLChicletPanel::~LLChicletPanel()
 
 void LLChicletPanel::onMessageCountChanged(const LLSD& data)
 {
-	LLUUID session_id = data["session_id"].asUUID();
-	S32 unread = data["participant_unread"].asInteger();
-
-	LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
-	if (im_floater && im_floater->getVisible() && im_floater->hasFocus())
-	{
-		unread = 0;
-	}
+	//LLUUID session_id = data["session_id"].asUUID();
+	//S32 unread = data["participant_unread"].asInteger();
+
+	//LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
+	//if (im_floater && im_floater->getVisible() && im_floater->hasFocus())
+	//{
+	//	unread = 0;
+	//}
 }
 
 void LLChicletPanel::objectChicletCallback(const LLSD& data)
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 02f82aba6398ca982f1c19c4f7b8a8bc04700364..70256d0e78be99d11924496baa4fdf3005b9bd72 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1038,7 +1038,7 @@ void render_hud_attachments()
 	if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices())
 	{
 		LLCamera hud_cam = *LLViewerCamera::getInstance();
-		LLVector3 origin = hud_cam.getOrigin();
+		//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 db3476850beaa26fe29f1571a650825d69f0164b..a6cd2c9ab71111415672b8a8a3229ac1d80af002 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2837,7 +2837,7 @@ void LLViewerWindow::updateUI()
 
 	BOOL handled = FALSE;
 
-	BOOL handled_by_top_ctrl = 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);
@@ -3022,7 +3022,7 @@ 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;
+				//handled_by_top_ctrl = TRUE;
 			}
 
 			if ( !handled )
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index ffb0964499c3ceb2a04e77d77871baae5afed4c3..c82fc50812a31514b63a53ef1eb2ceeb0b5b9ccb 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -965,7 +965,7 @@ 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;
+	//BOOL is_in_window = true;
 
 	if(    x < 0 
 		|| y < 0 
@@ -979,7 +979,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
 			text_x = sTrackingArrowX;
 			text_y = sTrackingArrowY;
 		}
-		is_in_window = false;
+		//is_in_window = false;
 	}
 	else if (LLTracker::getTrackingStatus() == LLTracker::TRACKING_LOCATION &&
 		LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING)