diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 6bfd8c14d608fc3344f30e762dffb58ef89756c7..aa1d50b993a82e60fd8f38da436eb1c70583a39f 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -135,6 +135,10 @@ if (LINUX)
     set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-uninitialized -Wno-unused-variable -Wno-unused-function ${CMAKE_CXX_FLAGS}")
   endif (${CXX_VERSION_NUMBER} LESS 420)
 
+  if(${CXX_VERSION_NUMBER} GREATER 459)
+    set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
+  endif (${CXX_VERSION_NUMBER} GREATER 459)
+
   # gcc 4.3 and above don't like the LL boost and also
   # cause warnings due to our use of deprecated headers
   if(${CXX_VERSION_NUMBER} GREATER 429)
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index eff224743ba4b5da9c4ac83e358307c89734ada8..cb5633c1bb11b6db436e17f60f57d5e2e0ed871c 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5314,12 +5314,7 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
 	S32 max_t = volume->getPath().mPath.size();
 
 	// S32 i;
-	S32 num_vertices = 0, num_indices = 0;
 	S32	grid_size = (profile.size()-1)/4;
-	S32	quad_count = (grid_size * grid_size);
-
-	num_vertices = (grid_size+1)*(grid_size+1);
-	num_indices = quad_count * 4;
 
 	LLVector4a& min = mExtents[0];
 	LLVector4a& max = mExtents[1];
diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp
index 0287026659a1b4406356a4cecfd5592a0e2e31b9..7713e553ef6f14ec870152c71b3ffdf4ef4aafba 100644
--- a/indra/llmessage/lliosocket.cpp
+++ b/indra/llmessage/lliosocket.cpp
@@ -592,6 +592,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
 	PUMP_DEBUG;
 	apr_pool_t* new_pool = NULL;
 	apr_status_t status = apr_pool_create(&new_pool, mPool);
+	(void)status;
 	apr_socket_t* socket = NULL;
 	status = apr_socket_accept(
 		&socket,
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 161496b1f5a36b9a37bb8875e4c9d64c8e6c0396..fdfaf284decc1698d9ac7cd9ac132168af88b608 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -243,8 +243,6 @@ void LLConsole::draw()
 void LLConsole::Paragraph::makeParagraphColorSegments (const LLColor4 &color) 
 {
 	LLSD paragraph_color_segments;
-	LLColor4 lcolor=color;
-	
 	paragraph_color_segments[0]["text"] =wstring_to_utf8str(mParagraphText);
 	LLSD color_sd = color.getValue();
 	paragraph_color_segments[0]["color"]=color_sd;
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index c1cd04186bda56afc329e0a255bc46269f56408f..537cc823021c21e5cb905093982ae9e666f53029 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -368,7 +368,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW
 	const llwchar* base = wtext.c_str();
 	const llwchar* cur = base;
 	const llwchar* line = NULL;
-
+        (void)line;
 	while( *cur )
 	{
 		if( *cur == '\n' || cur == base )
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index c93f5385700c526da0d7585b6fb9ebf94d6dd4a7..32383b1f1d8774c597ce5d3f33598949bf70c5e4 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -481,7 +481,7 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
 		{
 			LLResizeBar::Side side = (mOrientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM;
 			LLRect resize_bar_rect = getRect();
-
+			(void)resize_bar_rect;
 			LLResizeBar::Params resize_params;
 			resize_params.name("resize");
 			resize_params.resizing_view(lp);
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 3815eec447e73908208ff8680bd03bc9aa983466..ec66b6df566499ec3f71dd93fbb1b3d107ed08a1 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -351,7 +351,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();
@@ -2241,6 +2240,8 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,
 	// Figure out which line we're nearest to.
 	LLRect visible_region = getVisibleDocumentRect();
 	LLRect doc_rect = mDocumentView->getRect();
+	(void)visible_region;
+	(void)doc_rect;
 
 	S32 doc_y = local_y - doc_rect.mBottom;
 	
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 46fbd1e6a0f72c442a6d358e1ef92ff6d261e4ba..e4bd51c8ce248a437fee09ad196720bd33625774 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2490,7 +2490,6 @@ void LLTextEditor::updateSegments()
 		mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this);
 
 		clearSegments();
-		segment_set_t::iterator insert_it = mSegments.begin();
 		for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)
 		{
 			insertSegment(*list_it);
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 63b7e452d2ad1c4340d465ac1b8648951ec17d44..62b6a0cd2fec9455806d2510108b64e184a547c7 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -653,7 +653,6 @@ void LLToolBar::updateLayoutAsNeeded()
 	S32 max_row_length = 0;
 
 	S32 max_length;
-	S32 max_total_girth;
 	S32 cur_start;
 	S32 cur_row ;
 	S32 row_pad_start;
@@ -664,7 +663,6 @@ void LLToolBar::updateLayoutAsNeeded()
 	if (orientation == LLLayoutStack::HORIZONTAL)
 	{
 		max_length = getRect().getWidth() - mPadLeft - mPadRight;
-		max_total_girth = getRect().getHeight() - mPadTop - mPadBottom;
 		row_pad_start = mPadLeft;
 		row_pad_end = mPadRight;
 		cur_row = mPadTop;
@@ -673,7 +671,6 @@ void LLToolBar::updateLayoutAsNeeded()
 	else // VERTICAL
 	{
 		max_length = getRect().getHeight() - mPadTop - mPadBottom;
-		max_total_girth = getRect().getWidth() - mPadLeft - mPadRight;
 		row_pad_start = mPadTop;
 		row_pad_end = mPadBottom;
 		cur_row = mPadLeft;
@@ -842,6 +839,7 @@ void LLToolBar::draw()
 	{
 		LLRect caret_rect = caret->getRect();
 		LLRect toolbar_rect = getRect();
+		(void)toolbar_rect;
 		if (getOrientation(mSideType) == LLLayoutStack::HORIZONTAL)
 		{
 			caret->setRect(LLRect(mDragx-caret_rect.getWidth()/2+1,
diff --git a/indra/lscript/lscript_execute/lscript_readlso.cpp b/indra/lscript/lscript_execute/lscript_readlso.cpp
index 35caa41ae18be324696e53d3985ab910d9d890fa..3cdb41ac17859db739d7b34c8051db033855b200 100644
--- a/indra/lscript/lscript_execute/lscript_readlso.cpp
+++ b/indra/lscript/lscript_execute/lscript_readlso.cpp
@@ -145,7 +145,7 @@ void LLScriptLSOParse::printGlobals(LLFILE *fp)
 		// get offset to skip past name
 		varoffset = global_v_offset;
 		offset = bytestream2integer(mRawData, global_v_offset);
-		
+		(void)offset; //hush little compiler
 		// get typeexport
 		type = *(mRawData + global_v_offset++);
 
@@ -262,8 +262,6 @@ void LLScriptLSOParse::printGlobalFunctions(LLFILE *fp)
 		fprintf(fp, "[Function #%d] [0x%X] %s\n", function_number, orig_function_offset, name);
 		fprintf(fp, "\tReturn Type: %s\n", LSCRIPTTypeNames[type]);
 		type = *(mRawData + function_offset++);
-		S32 params;
-		params = 0;
 		S32 pcount = 0;
 		while (type)
 		{
@@ -350,6 +348,7 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
 				S32 dummy;
 
 				opcode_end = worst_case_opcode_end;
+				(void)opcode_end;
 
 				for (k = LSTT_STATE_BEGIN; k < LSTT_STATE_END; k++)
 				{
@@ -357,6 +356,7 @@ void LLScriptLSOParse::printStates(LLFILE *fp)
 					{
 						temp_end = bytestream2integer(mRawData, read_ahead);
 						dummy = bytestream2integer(mRawData, read_ahead);
+						(void)dummy;
 						if (  (temp_end < opcode_end)
 							&&(temp_end > event_offset))
 						{
diff --git a/indra/test/io.cpp b/indra/test/io.cpp
index ce747f667d2d53e0ed78b4d1640b5432877309cd..7f26ac672463d7948892a16f58ecc8229024a233 100644
--- a/indra/test/io.cpp
+++ b/indra/test/io.cpp
@@ -1141,6 +1141,7 @@ namespace tut
 		ensure("Connected to server", connected);
 		lldebugs << "connected" << llendl;
 		F32 elapsed = pump_loop(mPump,0.1f);
+		(void)elapsed;
 		count = mPump->runningChains();
 		ensure_equals("server chain onboard", count, 2);
 		lldebugs << "** Client is connected." << llendl;
diff --git a/indra/test/llstreamtools_tut.cpp b/indra/test/llstreamtools_tut.cpp
index a93f2e8f65e992001e06fadb88383cdd20c522bb..68e56b5ee2d8a502a80b425beb7e62c5c9dca1db 100644
--- a/indra/test/llstreamtools_tut.cpp
+++ b/indra/test/llstreamtools_tut.cpp
@@ -386,15 +386,17 @@ namespace tut
 		std::string actual_result;
 		std::istringstream is;
 		bool ret;
-
 		is.clear();
 		is.str(str = "  First Second \t \r  \n Third  Fourth-ShouldThisBePartOfFourth  Fifth\n");
 		actual_result = "";
 		ret = get_word(actual_result, is); // First
+		(void)ret;
 		actual_result = "";
 		ret = get_word(actual_result, is); // Second
+		(void)ret;
 		actual_result = "";
 		ret = get_word(actual_result, is); // Third
+		(void)ret;
 
 		// the current implementation of get_word seems inconsistent with
 		// skip_to_next_word. skip_to_next_word treats any character other
@@ -486,6 +488,7 @@ namespace tut
 		is.str(str = "First Second \t \r\n Third  Fourth-ShouldThisBePartOfFourth  IsThisFifth\n");
 		actual_result = "";
 		ret = get_line(actual_result, is);
+		(void)ret;
 		expected_result = "First Second \t \r\n";
 		ensure_equals("get_line: 1", actual_result, expected_result);
 
@@ -551,6 +554,7 @@ namespace tut
 		is.str(str = "Should not skip lone \r.\r\n");
 		actual_result = "";
 		ret = get_line(actual_result, is);
+		(void)ret;
 		expected_result = "Should not skip lone \r.\r\n";
 		ensure_equals("get_line: carriage return skipped even though not followed by newline", actual_result, expected_result);
 	}
@@ -569,6 +573,7 @@ namespace tut
 		is.str(str = "\n");
 		actual_result = "";
 		ret = get_line(actual_result, is);
+		(void)ret;
 		expected_result = "\n";
 		ensure_equals("get_line: Just newline", actual_result, expected_result);
 	}
@@ -588,6 +593,7 @@ namespace tut
 		is.str(str = "First Line.\nSecond Line.\n");
 		actual_result = "";
 		ret = get_line(actual_result, is, 255);
+		(void)ret;
 		expected_result = "First Line.\n";
 		ensure_equals("get_line: Basic Operation", actual_result, expected_result);
 
diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp
index 6e1c82bb2464949a99ef34854bade4aa8df3d25e..0aad3cbc15671a0e2f7f98a7261ef9ec91a1071e 100644
--- a/indra/test/lltemplatemessagebuilder_tut.cpp
+++ b/indra/test/lltemplatemessagebuilder_tut.cpp
@@ -958,11 +958,13 @@ namespace tut
 		reader->validateMessage(buffer, builtSize, LLHost());
 		reader->readMessage(buffer, LLHost());
 		reader->getU32(_PREHASH_Test0, _PREHASH_Test0, outValue);
+		(void)outValue;
 		char outBuffer[bufferSize];
 		memset(buffer, 0xcc, bufferSize);
 		reader->getString(_PREHASH_Test1, _PREHASH_Test0, bufferSize, 
 						  outBuffer);
 		outValue2 = reader->getNumberOfBlocks(_PREHASH_Test1);
+		(void)outValue2;
 		ensure_equals("Ensure present value ", outValue, inValue);
 		ensure_equals("Ensure unchanged buffer ", strlen(outBuffer), 0);
 		delete reader;