diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index a47ee7ca7ca692053b86f72dec6efee2cd81fa17..28b69e19739bfda0550fb6ed433144bb0007c21f 100644
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -37,6 +37,7 @@
 #include "lluuid.h"
 #include "llframetimer.h"
 #include "llassettype.h"
+#include "llextendedstatus.h"
 
 #include "lllistener.h"
 
diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h
index 2e4885403eadf3405d2c09d0b0c4de3af6d88159..5cfcdab41cd331c43df806e628e0ace851492b89 100644
--- a/indra/llcommon/linden_common.h
+++ b/indra/llcommon/linden_common.h
@@ -52,22 +52,11 @@
 #include <ctime>
 #include <iosfwd>
 
-// *TODO: Eliminate these, most library .cpp files don't need them.
-// Add them to llviewerprecompiledheaders.h if necessary.
-//#include <list>
-//#include <map>
-//#include <vector>
-//#include <string>
-
 // Linden only libs in alpha-order other than stdtypes.h
 // *NOTE: Please keep includes here to a minimum, see above.
 #include "stdtypes.h"
 #include "lldefs.h"
 #include "llerror.h"
-#include "llextendedstatus.h"
-// Don't do this, adds 15K lines of header code to every library file.
-//#include "llfasttimer.h"
 #include "llfile.h"
-#include "llformat.h"
 
 #endif
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index 3509bd289b74114e12a32416ec197727a77a3056..e0ad270266eb2b742697344d4d25976f53f580b2 100644
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -174,7 +174,7 @@ struct LLCalcParser : grammar<LLCalcParser>
 	F32 _log(const F32& a) const { return log(a); }
 	F32 _exp(const F32& a) const { return exp(a); }
 	F32 _fabs(const F32& a) const { return fabs(a); }
-	F32 _floor(const F32& a) const { return (F3)llfloor(a); }
+	F32 _floor(const F32& a) const { return (F32)llfloor(a); }
 	F32 _ceil(const F32& a) const { return llceil(a); }
 
 	F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); }
diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp
index bb65d166706f42453726045bc7a4f1ab74f3de75..6257983c436ed51167b9f5121178f421a1308f57 100644
--- a/indra/llmessage/llbufferstream.cpp
+++ b/indra/llmessage/llbufferstream.cpp
@@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff(
 			// NULL is fine
 			break;
 		}
-		address = (S32)mBuffer->seek(mChannels.in(), base_addr, off);
+		address = mBuffer->seek(mChannels.in(), base_addr, off);
 		if(address)
 		{
 			LLBufferArray::segment_iterator_t iter;
@@ -304,7 +304,7 @@ streampos LLBufferStreamBuf::seekoff(
 			// NULL is fine
 			break;
 		}
-		address = (S32)mBuffer->seek(mChannels.out(), base_addr, off);
+		address = mBuffer->seek(mChannels.out(), base_addr, off);
 		if(address)
 		{
 			LLBufferArray::segment_iterator_t iter;
diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h
index 989e8b2cab1bb8be75b41ba8a6b3c505997159a7..f9348eb11f100cd9e11ade66cdb27625dd8858b0 100644
--- a/indra/llmessage/llxfer.h
+++ b/indra/llmessage/llxfer.h
@@ -29,6 +29,7 @@
 
 #include "message.h"
 #include "lltimer.h"
+#include "llextendedstatus.h"
 
 const S32 LL_XFER_LARGE_PAYLOAD = 7680;
 
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index f1ffb6547f2aabd3e1bf610013a1eaaa7c5b4a51..b7854c56973fcbe11a76cb6f738de746a85971f6 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -32,6 +32,7 @@
 #include "lldynamictexture.h"
 #include "llcharacter.h"
 #include "llquaternion.h"
+#include "llextendedstatus.h"
 
 class LLVOAvatar;
 class LLViewerJointMesh;
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index c402de66e86443ed6be7be5427c47fb7b0e8c787..ae45949b4a46018046b2ff2863bc0ceeb96e34a3 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -33,6 +33,7 @@
 #include "llfloater.h"
 #include "llhost.h"
 #include "llpanel.h"
+#include "llextendedstatus.h"
 
 #include "llenvmanager.h" // for LLEnvironmentSettings
 
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index cd98f7be57312b4b2b1de51e5e46424a10e64098..7d684317103d4e747e17ee02fde1fdc8dc868085 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -31,6 +31,7 @@
 #include "llfloater.h"
 #include "lluuid.h"
 #include "v3math.h"
+#include "llextendedstatus.h"
 
 class LLAvatarName;
 class LLMessageSystem;
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 04e157008111bf7c43e51933aad8876dc8884caf..7a70370fe33519106950250dd2f98d197ac25bdd 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -29,6 +29,7 @@
 
 #include "llstring.h"
 #include "lluuid.h"
+#include "llextendedstatus.h"
 
 class LLViewerObject;
 class LLMessageSystem;
diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h
index 896e17c3c31d08024b38681f9eb2374fa8b2bcae..759430c3a5ef6bc1d8a9a4f24222e76da77e0f7d 100644
--- a/indra/newview/llpreview.h
+++ b/indra/newview/llpreview.h
@@ -32,6 +32,7 @@
 #include "llpointer.h"
 #include "lluuid.h"
 #include "llinventoryobserver.h"
+#include "llextendedstatus.h"
 #include <map>
 
 class LLInventoryItem;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index d8acd99953844cb18ead8aca25b722a99e6ed67e..46bfb2dad06f614dd4c609e298392794e928404c 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -35,6 +35,7 @@
 #include "message.h"
 #include "stdenums.h"
 #include "llnotifications.h"
+#include "llextendedstatus.h"
 
 //
 // Forward declarations