diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 6e05ce8b4aed0d9d91b97ee813a767a703c8ac60..646ef07a07c68eaaf1f4e82af5423a6326403a81 100755
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -135,8 +135,6 @@ void LLMemory::updateMemoryInfo()
 	sMaxPhysicalMemInKB = (U32Bytes)U32_MAX ;
 	sAvailPhysicalMemInKB = (U32Bytes)U32_MAX ;
 #endif
-
-	return ;
 }
 
 //
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 742e33e747ae787f7ac0be9647f06880a4d818c1..b8c4ec8e6599b6ef25229d83df22497efd8a7c28 100755
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -247,13 +247,13 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
 
 		TimerBar* hover_bar = NULL;
 		F32Seconds mouse_time_offset = ((F32)(x - mBarRect.mLeft) / (F32)mBarRect.getWidth()) * mTotalTimeDisplay;
-		for (int bar_index = 0, end_index = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount(); 
+		for (S32 bar_index = 0, end_index = LLTrace::BlockTimerStatHandle::instance_tracker_t::instanceCount(); 
 			bar_index < end_index; 
 			++bar_index)
 		{
 			if (!row.mBars)
 			{
-				LL_WARNS() << "Timber row mTimerBarRows.mBars is null bailing out" << LL_ENDL;
+				LL_WARNS() << "mTimerBarRows.mBars is null at index: " << bar_index << " bailing out" << LL_ENDL;
 				break;
 			}
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 209e2d88f344aaadb22e49a748ddcf460a051937..bf32ff6198b0d948b02d623d5d4651a5953fe3ea 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2412,9 +2412,11 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
 			}
 		}
 #else
-		std::vector<std::pair<LLViewerObject*,LLViewerJointAttachment*> >::iterator attachment_iter = mAttachedObjectsVector.begin();
-		for(;attachment_iter!=mAttachedObjectsVector.end();++attachment_iter)
-		{{
+		std::vector<std::pair<LLViewerObject*, LLViewerJointAttachment*> >::iterator attachment_iter = mAttachedObjectsVector.begin(),
+			iter_end = mAttachedObjectsVector.end();
+		for (; attachment_iter != iter_end; ++attachment_iter)
+		{
+			{
 				LLViewerJointAttachment* attachment = attachment_iter->second;
 				LLViewerObject* attached_object = attachment_iter->first;
 
@@ -6086,12 +6088,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
 		{
 			mVisualComplexityStale = TRUE;
 #if !USE_LL_APPEARANCE_CODE
-			std::vector<std::pair<LLViewerObject*,LLViewerJointAttachment*> >::iterator it = std::find(mAttachedObjectsVector.begin(),mAttachedObjectsVector.end(),std::make_pair(viewer_object,attachment));
-			if(it != mAttachedObjectsVector.end())
-			{
-				(*it) = mAttachedObjectsVector.back();
-				mAttachedObjectsVector.pop_back();
-			}
+			vector_replace_with_last(mAttachedObjectsVector,std::make_pair(viewer_object,attachment));
 #endif
 
 			cleanupAttachedMesh( viewer_object );
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 9f2fde9c8f48b63164e8aed11c4388a15cd80b1f..aa7b76da0936a943ef4b82febee3da8cb17b6deb 100755
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -703,8 +703,8 @@ void LLWorld::updateRegions(F32 max_update_time)
 	//sort regions by its mLastUpdate
 	//smaller mLastUpdate first to make sure every region has chance to get updated.
 	LLViewerRegion::region_priority_list_t region_list;
-	for (region_list_t::iterator iter = mRegionList.begin();
-		 iter != mRegionList.end(); ++iter)
+	for (region_list_t::iterator iter = mRegionList.begin(), iter_end = mRegionList.end();
+		iter != iter_end; ++iter)
 	{
 		LLViewerRegion* regionp = *iter;
 		if(regionp != self_regionp)
@@ -715,8 +715,8 @@ void LLWorld::updateRegions(F32 max_update_time)
 	}
 
 	// Perform idle time updates for the regions (and associated surfaces)
-	for (LLViewerRegion::region_priority_list_t::iterator iter = region_list.begin();
-		 iter != region_list.end(); ++iter)
+	for (LLViewerRegion::region_priority_list_t::iterator iter = region_list.begin(), iter_end = region_list.end();
+		 iter != iter_end; ++iter)
 	{
 		if(max_time > 0.f)
 		{