From 875606a04d656ef6e5600a3a7fb6e8b52feb1945 Mon Sep 17 00:00:00 2001
From: Steven Bennetts <steve@lindenlab.com>
Date: Sun, 11 May 2008 20:56:42 +0000
Subject: [PATCH] QAR-566 maint-viewer-5-merge-2 Effective merge: release@84102
 maint-viewer-5@86348 -> maint-viewer-5-merge-2 Actual merge
 maint-viewer-5-merge-2 -r 87239 : 87246 -> release

---
 doc/contributions.txt                         |  3 ++
 indra/llcharacter/llmotion.cpp                | 28 +++++++--------
 indra/llcharacter/llmotion.h                  |  4 +--
 indra/llcommon/llptrskipmap.h                 |  6 ++--
 indra/llcommon/llsdserialize.h                |  2 +-
 indra/llmath/llvolume.cpp                     | 12 -------
 indra/llmath/llvolume.h                       | 12 ++++++-
 indra/llmath/m4math.h                         | 16 ++++-----
 indra/llmessage/llcurl.cpp                    |  5 +--
 indra/llmessage/llhttpassetstorage.cpp        |  2 ++
 indra/llmessage/lltransfermanager.cpp         |  4 ++-
 indra/llmessage/lltransfersourcefile.cpp      |  4 ++-
 indra/llrender/llrendertarget.cpp             | 14 +++++---
 indra/llwindow/llwindowmacosx-objc.mm         |  8 +++++
 indra/lscript/lscript_compile/indra.l         |  5 +++
 .../lscript_execute/lscript_execute.cpp       | 34 -------------------
 indra/newview/app_settings/keywords.ini       |  4 +++
 indra/newview/lldrawpoolalpha.h               |  3 --
 indra/newview/llfloaterproperties.cpp         |  2 +-
 indra/newview/llpanelpermissions.cpp          | 13 ++++++-
 indra/newview/llselectmgr.cpp                 |  6 +---
 indra/newview/llviewermenu.cpp                |  7 ++--
 indra/newview/llvosky.cpp                     |  6 ++--
 indra/newview/llvosky.h                       | 23 +++++++------
 indra/newview/llwaterparammanager.cpp         |  7 ++--
 indra/newview/llwaterparammanager.h           | 10 +++---
 indra/newview/llwlparammanager.cpp            |  2 +-
 indra/newview/llwlparammanager.h              |  5 ---
 indra/newview/llwlparamset.h                  |  8 -----
 indra/newview/llworld.cpp                     | 25 ++++++++------
 indra/newview/viewer_manifest.py              |  1 -
 31 files changed, 137 insertions(+), 144 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index b5ca98dc311..2799cd80e44 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -172,6 +172,7 @@ Jacek Antonelli
 	VWR-427
 	VWR-597
 	VWR-2448
+	VWR-3605
 Joghert LeSabre
 	VWR-64
 Kage Pixel
@@ -293,6 +294,8 @@ Robin Cornelius
 	VWR-2488
 Ryozu Kojima
 	VWR-287
+Sammy Frederix
+	VWR-6186
 Scrippy Scofield
 	VWR-3748
 Seg Baphomet
diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp
index bf332ed8382..9123ebfcbd8 100644
--- a/indra/llcharacter/llmotion.cpp
+++ b/indra/llcharacter/llmotion.cpp
@@ -47,22 +47,20 @@
 // LLMotion()
 // Class Constructor
 //-----------------------------------------------------------------------------
-LLMotion::LLMotion( const LLUUID &id )
+LLMotion::LLMotion( const LLUUID &id ) :
+	mStopped(TRUE),
+	mActive(FALSE),
+	mID(id),
+	mActivationTimestamp(0.f),
+	mStopTimestamp(0.f),
+	mSendStopTimestamp(F32_MAX),
+	mResidualWeight(0.f),
+	mFadeWeight(1.f),
+	mDeactivateCallback(NULL),
+	mDeactivateCallbackUserData(NULL)
 {
-	mActivationTimestamp = 0.f;
-	mStopTimestamp = 0.f;
-	mSendStopTimestamp = F32_MAX;
-	mResidualWeight = 0.f;
-	mFadeWeight = 1.f;
-	mStopped = TRUE;
-	mActive = FALSE;
-	mDeactivateCallback = NULL;
-
-	memset(&mJointSignature[0][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
-	memset(&mJointSignature[1][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
-	memset(&mJointSignature[2][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);	
-
-	mID = id;
+	for (int i=0; i<3; ++i)
+		memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_JOINTS);
 }
 
 //-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h
index 7669920339b..13825dde306 100644
--- a/indra/llcharacter/llmotion.h
+++ b/indra/llcharacter/llmotion.h
@@ -49,13 +49,13 @@ class LLCharacter;
 class LLMotion
 {
 public:
-	enum LLMotionBlendType
+	typedef enum LLMotionBlendType
 	{
 		NORMAL_BLEND,
 		ADDITIVE_BLEND
 	};
 
-	enum LLMotionInitStatus
+	typedef enum LLMotionInitStatus
 	{
 		STATUS_FAILURE,
 		STATUS_SUCCESS,
diff --git a/indra/llcommon/llptrskipmap.h b/indra/llcommon/llptrskipmap.h
index e505004b63f..b511d686ae8 100644
--- a/indra/llcommon/llptrskipmap.h
+++ b/indra/llcommon/llptrskipmap.h
@@ -238,7 +238,8 @@ class LLPtrSkipMap
 template <class INDEX_T, class DATA_T, S32 BINARY_DEPTH>
 inline LLPtrSkipMap<INDEX_T, DATA_T, BINARY_DEPTH>::LLPtrSkipMap()
 	:	mInsertFirst(NULL),
-		mEquals(defaultEquals)
+		mEquals(defaultEquals),
+		mNumberOfSteps(0)
 {
 	if (BINARY_DEPTH < 2)
 	{
@@ -259,7 +260,8 @@ template <class INDEX_T, class DATA_T, S32 BINARY_DEPTH>
 inline LLPtrSkipMap<INDEX_T, DATA_T, BINARY_DEPTH>::LLPtrSkipMap(insert_func insert_first, 
 																 equals_func equals) 
 :	mInsertFirst(insert_first),
-	mEquals(equals)
+	mEquals(equals),
+	mNumberOfSteps(0)
 {
 	if (BINARY_DEPTH < 2)
 	{
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index 26ce1dc993c..5e880701302 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -390,7 +390,7 @@ class LLSDFormatter : public LLRefCount
 	/**
 	 * Options for output
 	 */
-	enum e_formatter_options_type
+	typedef enum e_formatter_options_type
 	{
 		OPTIONS_NONE = 0,
 		OPTIONS_PRETTY = 1
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index e34c866a807..ecc4b09d109 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4181,18 +4181,6 @@ std::ostream& operator<<(std::ostream &s, const LLVolume *volumep)
 }
 
 
-LLVolumeFace::LLVolumeFace()
-{
-	mTypeMask = 0;
-	mID = 0;
-	mBeginS = 0;
-	mBeginT = 0;
-	mNumS = 0;
-	mNumT = 0;
-	mHasBinormals = FALSE;
-}
-
-
 BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build)
 {
 	if (mTypeMask & CAP_MASK)
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 91415ee0361..4bc8495ad36 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -761,7 +761,17 @@ class LLDynamicPath : public LLPath
 class LLVolumeFace
 {
 public:
-	LLVolumeFace();
+	LLVolumeFace() : 
+		mID(0),
+		mTypeMask(0),
+		mHasBinormals(FALSE),
+		mBeginS(0),
+		mBeginT(0),
+		mNumS(0),
+		mNumT(0)
+	{
+	}
+
 	BOOL create(LLVolume* volume, BOOL partial_build = FALSE);
 	void createBinormals();
 
diff --git a/indra/llmath/m4math.h b/indra/llmath/m4math.h
index 7eacbf65424..790e77abc6b 100644
--- a/indra/llmath/m4math.h
+++ b/indra/llmath/m4math.h
@@ -1,6 +1,6 @@
 /** 
  * @file m4math.h
- * @brief LLMatrix3 class header file.
+ * @brief LLMatrix4 class header file.
  *
  * $LicenseInfo:firstyear=2000&license=viewergpl$
  * 
@@ -101,9 +101,13 @@ class LLMatrix4
 public:
 	F32	mMatrix[NUM_VALUES_IN_MAT4][NUM_VALUES_IN_MAT4];
 
-	LLMatrix4();										// Initializes Matrix to identity matrix
+	// Initializes Matrix to identity matrix
+	LLMatrix4()
+	{
+		setIdentity();
+	}
 	explicit LLMatrix4(const F32 *mat);								// Initializes Matrix to values in mat
-	explicit LLMatrix4(const LLMatrix3 &mat);						// Initializes Matrix to valuee in mat and sets position to (0,0,0)
+	explicit LLMatrix4(const LLMatrix3 &mat);						// Initializes Matrix to values in mat and sets position to (0,0,0)
 	explicit LLMatrix4(const LLQuaternion &q);						// Initializes Matrix with rotation q and sets position to (0,0,0)
 
 	LLMatrix4(const LLMatrix3 &mat, const LLVector4 &pos);	// Initializes Matrix to values in mat and pos
@@ -240,12 +244,6 @@ class LLMatrix4
 	friend std::ostream&	 operator<<(std::ostream& s, const LLMatrix4 &a);	// Stream a
 };
 
-
-inline LLMatrix4::LLMatrix4()
-{
-	setIdentity();
-}
-
 inline const LLMatrix4&	LLMatrix4::setIdentity()
 {
 	mMatrix[0][0] = 1.f;
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 8afcb6ba4f4..193cc0d4a84 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -674,8 +674,9 @@ std::string LLCurl::strerror(CURLcode errorcode)
 // For generating a simple request for data
 // using one multi and one easy per request 
 
-LLCurlRequest::LLCurlRequest()
-	: mActiveMulti(NULL)
+LLCurlRequest::LLCurlRequest() :
+	mActiveMulti(NULL),
+	mActiveRequestCount(0)
 {
 }
 
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 21790648073..e5254bbc0f6 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -334,6 +334,8 @@ void LLHTTPAssetRequest::finishCompressedUpload()
 
 size_t LLHTTPAssetRequest::readCompressedData(void* data, size_t size)
 {
+	llassert(mZInitialized);
+
 	mZStream.next_out = (Bytef*)data;
 	mZStream.avail_out = size;
 
diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp
index ff4f8a2e660..6b20a2c0c89 100644
--- a/indra/llmessage/lltransfermanager.cpp
+++ b/indra/llmessage/lltransfermanager.cpp
@@ -1336,7 +1336,9 @@ BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp)
 }
 
 LLTransferSourceParamsEstate::LLTransferSourceParamsEstate() :
-	LLTransferSourceParams(LLTST_SIM_ESTATE), mEstateAssetType(ET_NONE)
+	LLTransferSourceParams(LLTST_SIM_ESTATE),
+	mEstateAssetType(ET_NONE),
+	mAssetType(LLAssetType::AT_NONE)
 {
 }
 
diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp
index abbef1cc630..268421627e3 100644
--- a/indra/llmessage/lltransfersourcefile.cpp
+++ b/indra/llmessage/lltransfersourcefile.cpp
@@ -153,7 +153,9 @@ BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp)
 }
 
 
-LLTransferSourceParamsFile::LLTransferSourceParamsFile() : LLTransferSourceParams(LLTST_FILE)
+LLTransferSourceParamsFile::LLTransferSourceParamsFile() :
+	LLTransferSourceParams(LLTST_FILE),
+	mDeleteOnCompletion(FALSE)
 {
 }
 
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 4efe078ad7a..5111c7ae2d7 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -38,11 +38,17 @@
 
 BOOL LLRenderTarget::sUseFBO = FALSE;
 
-LLRenderTarget::LLRenderTarget()
+LLRenderTarget::LLRenderTarget() :
+	mResX(0),
+	mResY(0),
+	mTex(0),
+	mFBO(0),
+	mDepth(0),
+	mStencil(0),
+	mUseDepth(FALSE),
+	mRenderDepth(FALSE),
+	mUsage(GL_TEXTURE_2D)
 {
-	mResX = mResY = mTex = mFBO = mDepth = 0;
-	mUseDepth = FALSE;
-	mUsage = GL_TEXTURE_2D;
 }
 
 LLRenderTarget::~LLRenderTarget()
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index b68ea8ef8f9..59b25e17268 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -47,6 +47,8 @@ void setupCocoa()
 	
 	if(!inited)
 	{
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+		
 		// This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor":
 		//   http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html
 		
@@ -55,6 +57,8 @@ void setupCocoa()
 
 		//	Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image
 		[[[NSWindow alloc] init] release];
+
+		[pool release];
 	}
 }
 
@@ -82,8 +86,10 @@ OSErr releaseImageCursor(CursorRef ref)
 {
 	if( ref != NULL )
 	{
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 		NSCursor *cursor = (NSCursor*)ref;
 		[cursor release];
+		[pool release];
 	}
 	else
 	{
@@ -97,8 +103,10 @@ OSErr setImageCursor(CursorRef ref)
 {
 	if( ref != NULL )
 	{
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 		NSCursor *cursor = (NSCursor*)ref;
 		[cursor set];
+		[pool release];
 	}
 	else
 	{
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 3dc10fe20b8..ba10ef6fcca 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -606,6 +606,11 @@ extern "C" { int yyerror(const char *fmt, ...); }
 "CLICK_ACTION_PLAY"       { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); }
 "CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); }
 
+"TEXTURE_BLANK"           { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "5748decc-f629-461c-9a36-a35a221fe21f"); return(STRING_CONSTANT); }
+"TEXTURE_DEFAULT"           { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"); return(STRING_CONSTANT); }
+"TEXTURE_PLYWOOD"           { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "89556747-24cb-43ed-920b-47caed15465f"); return(STRING_CONSTANT); }
+"TEXTURE_TRANSPARENT"           { yylval.sval = new char[UUID_STR_LENGTH]; strcpy(yylval.sval, "59facb66-4a72-40a2-815c-7d9b42c56f60"); return(STRING_CONSTANT); }
+
 {L}({L}|{N})*		{ count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
 
 {N}+{E}					{ count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp
index b30e781d830..f1c0ead118d 100644
--- a/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -3040,40 +3040,6 @@ BOOL run_return(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
 	return FALSE;
 }
 
-S32 axtoi(char *hexStg)
-{
-  S32 n = 0;         // position in string
-  S32 m = 0;         // position in digit[] to shift
-  S32 count;         // loop index
-  S32 intValue = 0;  // integer value of hex string
-  S32 digit[9];      // hold values to convert
-  while (n < 8)
-  {
-     if (hexStg[n]=='\0')
-        break;
-     if (hexStg[n] > 0x29 && hexStg[n] < 0x40 ) //if 0 to 9
-        digit[n] = hexStg[n] & 0x0f;            //convert to int
-     else if (hexStg[n] >='a' && hexStg[n] <= 'f') //if a to f
-        digit[n] = (hexStg[n] & 0x0f) + 9;      //convert to int
-     else if (hexStg[n] >='A' && hexStg[n] <= 'F') //if A to F
-        digit[n] = (hexStg[n] & 0x0f) + 9;      //convert to int
-     else break;
-    n++;
-  }
-  count = n;
-  m = n - 1;
-  n = 0;
-  while(n < count)
-  {
-     // digit[n] is value of hex digit at position n
-     // (m << 2) is the number of positions to shift
-     // OR the bits into return value
-     intValue = intValue | (digit[n] << (m << 2));
-     m--;   // adjust the position to set
-     n++;   // next digit to process
-  }
-  return (intValue);
-}
 
 
 BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini
index 9a8b1f7537b..b6892dc2624 100644
--- a/indra/newview/app_settings/keywords.ini
+++ b/indra/newview/app_settings/keywords.ini
@@ -507,6 +507,10 @@ CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the defa
 [word .1, .3, .5]
 NULL_KEY			Indicates an empty key
 EOF					Indicates the last line of a notecard was read
+TEXTURE_BLANK			UUID for the "Blank" texture
+TEXTURE_DEFAULT			UUID for the "Default Media" texture
+TEXTURE_PLYWOOD			UUID for the default "Plywood" texture
+TEXTURE_TRANSPARENT		UUID for the "White - Transparent" texture
 
 # float constants
 [word .3, .1, .5]
diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h
index 637ea25f803..ffd62843530 100644
--- a/indra/newview/lldrawpoolalpha.h
+++ b/indra/newview/lldrawpoolalpha.h
@@ -68,13 +68,10 @@ class LLDrawPoolAlpha: public LLRenderPass
 	static BOOL sShowDebugAlpha;
 
 private:
-	S32 mDiffuse;
 	LLGLSLShader* current_shader;
 	LLGLSLShader* target_shader;
 	LLGLSLShader* simple_shader;
-	LLGLSLShader* simple_lod_shader;
 	LLGLSLShader* fullbright_shader;	
-	LLGLSLShader* fullbright_lod_shader;
 };
 
 class LLDrawPoolAlphaPostWater : public LLDrawPoolAlpha
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 74a880e0108..09888ebab0f 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -441,7 +441,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
 		
 		perm_string = "G";
 		perm_string += overwrite_group ? "*: " : ": ";
-		perm_string += perm_string += mask_to_string(group_mask);
+		perm_string += mask_to_string(group_mask);
 		childSetText("GroupMaskDebug",perm_string);
 		childSetVisible("GroupMaskDebug",TRUE);
 		
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 7f9dae8a640..7110ea4f93f 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -327,6 +327,7 @@ void LLPanelPermissions::refresh()
 
 	// update group text field
 	childSetEnabled("Group:",true);
+	childSetText("Group Name",LLString::null);
 	LLUUID group_id;
 	BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
 	if (groups_identical)
@@ -337,6 +338,16 @@ void LLPanelPermissions::refresh()
 			mLabelGroupName->setEnabled(TRUE);
 		}
 	}
+	else
+	{
+		if(mLabelGroupName)
+		{
+			mLabelGroupName->setNameID(LLUUID::null, TRUE);
+			mLabelGroupName->refresh(LLUUID::null, "", "", TRUE);
+			mLabelGroupName->setEnabled(FALSE);
+		}
+	}
+	
 	childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID()));
 
 	// figure out the contents of the name, description, & category
@@ -854,7 +865,7 @@ void callback_deed_to_group(S32 option, void*)
 	{
 		LLUUID group_id;
 		BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id);
-		if(groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
+		if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED)))
 		{
 			LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE);
 //			LLViewerStats::getInstance()->incStat(LLViewerStats::ST_RELEASE_COUNT);
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 179b1469ed2..9d7f183807d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -2510,11 +2510,7 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id)
 			}
 		}
 	}
-	if (first_id.isNull())
-	{
-		return FALSE;
-	}
-	
+
 	result_id = first_id;
 
 	return identical;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c4cd7a3a3d1..f7b9d2dc93b 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -401,8 +401,8 @@ void handle_duplicate_in_place(void*);
 void handle_repeat_duplicate(void*);
 
 void handle_export(void*);
-void handle_deed_object_to_group(void*);
-BOOL enable_deed_object_to_group(void*);
+// void handle_deed_object_to_group(void*);
+// BOOL enable_deed_object_to_group(void*);
 void handle_object_owner_self(void*);
 void handle_object_owner_permissive(void*);
 void handle_object_lock(void*);
@@ -3498,6 +3498,7 @@ void handle_repeat_duplicate(void*)
 	LLSelectMgr::getInstance()->repeatDuplicate();
 }
 
+/* dead code 30-apr-2008
 void handle_deed_object_to_group(void*)
 {
 	LLUUID group_id;
@@ -3523,6 +3524,8 @@ BOOL enable_deed_object_to_group(void*)
 	return FALSE;
 }
 
+*/
+
 
 /*
  * No longer able to support viewer side manipulations in this way
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 07fc1ece73b..1ef721e9183 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -194,11 +194,13 @@ inline void color_gamma_correct(LLColor3 &col)
 
 S32 LLSkyTex::sComponents = 4;
 S32 LLSkyTex::sResolution = 64;
-F32	LLSkyTex::sInterpVal = 0.f;
+F32 LLSkyTex::sInterpVal = 0.f;
 S32 LLSkyTex::sCurrent = 0;
 
 
-LLSkyTex::LLSkyTex()
+LLSkyTex::LLSkyTex() :
+	mSkyData(NULL),
+	mSkyDirs(NULL)
 {
 }
 
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 260aeeada7e..c2ab9ae6a47 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -207,7 +207,7 @@ class LLHeavenBody
 	F32				mDiskRadius;
 	BOOL			mDraw;					// FALSE - do not draw.
 	F32				mHorizonVisibility;		// number [0, 1] due to how horizon
-	F32				mVisibility;			// same but due to other objects being in frong.
+	F32				mVisibility;			// same but due to other objects being in throng.
 	BOOL			mVisible;
 	static F32		sInterpVal;
 	LLVector3		mQuadCorner[4];
@@ -217,10 +217,12 @@ class LLHeavenBody
 
 public:
 	LLHeavenBody(const F32 rad) :
-			mDirectionCached(LLVector3(0,0,0)), mDirection(LLVector3(0,0,0)),
-			mDiskRadius(rad), mDraw(FALSE),
-			mHorizonVisibility(1), mVisibility(1)
-
+		mDirectionCached(LLVector3(0,0,0)),
+		mDirection(LLVector3(0,0,0)),
+		mIntensity(0.f),
+		mDiskRadius(rad), mDraw(FALSE),
+		mHorizonVisibility(1.f), mVisibility(1.f),
+		mVisible(FALSE)
 	{
 		mColor.setToBlack();
 		mColorCached.setToBlack();
@@ -261,7 +263,6 @@ class LLHeavenBody
 	BOOL isVisible() const								{ return mVisible; }
 	void setVisible(const BOOL v)						{ mVisible = v; }
 
-
 	const F32& getIntensity() const						{ return mIntensity; }
 	void setIntensity(const F32 c)						{ mIntensity = c; }
 
@@ -311,19 +312,19 @@ LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level()
 
 const LLColor3 gAirScaSeaLevel = calc_air_sca_sea_level();
 const F32 AIR_SCA_INTENS = color_intens(gAirScaSeaLevel);	
-const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3;	
+const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3.f;
 
 class LLHaze
 {
 public:
-	LLHaze() : mG(0), mFalloff(1) {mSigSca.setToBlack();}
-	LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2) : 
-			mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0)
+	LLHaze() : mG(0), mFalloff(1), mAbsCoef(0.f) {mSigSca.setToBlack();}
+	LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2.f) : 
+			mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0.f)
 	{
 		mAbsCoef = color_intens(mSigSca) / AIR_SCA_INTENS;
 	}
 
-	LLHaze(const F32 g, const F32 sca, const F32 fo = 2) : mG(g),
+	LLHaze(const F32 g, const F32 sca, const F32 fo = 2.f) : mG(g),
 			mSigSca(0.25f/F_PI * LLColor3(sca, sca, sca)), mFalloff(fo)
 	{
 		mAbsCoef = 0.01f * sca / AIR_SCA_AVG;
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 16977176093..6cc7e603a6b 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -75,7 +75,8 @@ LLWaterParamManager::LLWaterParamManager() :
 	mBlurMultiplier(0.1f, "blurMultiplier"),
 	mWave1Dir(.5f, .5f, "wave1Dir"),
 	mWave2Dir(.5f, .5f, "wave2Dir"),
-	mDensitySliderValue(1.0f)
+	mDensitySliderValue(1.0f),
+	mWaterFogKS(1.0f)
 {
 }
 
@@ -255,8 +256,8 @@ void LLWaterParamManager::update(LLViewerCamera * cam)
 	if(gPipeline.canUseVertexShaders()) 
 	{
 		//transform water plane to eye space
-		glh::vec3f norm(0, 0, 1);
-		glh::vec3f p(0, 0, gAgent.getRegion()->getWaterHeight()+0.1f);
+		glh::vec3f norm(0.f, 0.f, 1.f);
+		glh::vec3f p(0.f, 0.f, gAgent.getRegion()->getWaterHeight()+0.1f);
 		
 		F32 modelView[16];
 		for (U32 i = 0; i < 16; i++)
diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
index 6892bb19240..937dd9e388e 100644
--- a/indra/newview/llwaterparammanager.h
+++ b/indra/newview/llwaterparammanager.h
@@ -315,18 +315,16 @@ class LLWaterParamManager
 	F32 mDensitySliderValue;
 
 private:
-	// our parameter manager singleton instance
-	static LLWaterParamManager * sInstance;
-
-private:
-
 	LLVector4 mWaterPlane;
 	F32 mWaterFogKS;
+
+	// our parameter manager singleton instance
+	static LLWaterParamManager * sInstance;
 };
 
 inline void LLWaterParamManager::setDensitySliderValue(F32 val)
 {
-	val /= 10;
+	val /= 10.0f;
 	val = 1.0f - val;
 	val *= val * val;
 //	val *= val;
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 68e402abdbd..ea960b39cd2 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -299,7 +299,7 @@ void LLWLParamManager::propagateParameters(void)
 	LLVector4 sunDir;
 	LLVector4 moonDir;
 
-	// set the sun direction from mSunAngle and mEastAngle
+	// set the sun direction from SunAngle and EastAngle
 	F32 sinTheta = sin(mCurParams.getEastAngle());
 	F32 cosTheta = cos(mCurParams.getEastAngle());
 
diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
index a78d92bf8b8..474db19cfa4 100644
--- a/indra/newview/llwlparammanager.h
+++ b/indra/newview/llwlparammanager.h
@@ -199,8 +199,6 @@ class LLWLParamManager
 public:
 
 	// helper variables
-	F32 mSunAngle;
-	F32 mEastAngle;
 	LLWLAnimator mAnimator;
 
 	/// actual direction of the sun
@@ -217,9 +215,6 @@ class LLWLParamManager
 	// list of params and how they're cycled for days
 	LLWLDayCycle mDay;
 
-	// length of the day in seconds
-	F32 mLengthOfDay;
-
 	LLWLParamSet mCurParams;
 
 	/// Sun Delta Terrain tweak variables.
diff --git a/indra/newview/llwlparamset.h b/indra/newview/llwlparamset.h
index 1f72fffdfcd..fe075ece9a6 100644
--- a/indra/newview/llwlparamset.h
+++ b/indra/newview/llwlparamset.h
@@ -132,18 +132,10 @@ class LLWLParamSet {
 	/// get the star brightness value;
 	F32 getStarBrightness();	
 	
-	/// set the star's brightness
-	/// \param val brightness value
 	void setSunAngle(F32 val);
-	
-	/// get the star brightness value;
 	F32 getSunAngle();	
 	
-	/// set the star's brightness
-	/// \param val brightness value
 	void setEastAngle(F32 val);
-	
-	/// get the star brightness value;
 	F32 getEastAngle();	
 	
 							
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index e45b929b6fb..e2463adde3a 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -83,22 +83,25 @@ const F32 LLWorld::mWidthInMeters = mWidth * mScale;
 //
 
 // allocate the stack
-LLWorld::LLWorld()
+LLWorld::LLWorld() :
+	mLandFarClip(DEFAULT_FAR_PLANE),
+	mLastPacketsIn(0),
+	mLastPacketsOut(0),
+	mLastPacketsLost(0),
+	mMinRegionX(0),
+	mMaxRegionX(0),
+	mMinRegionY(0),
+	mMaxRegionY(0),
+	mSpaceTimeUSec(0)
 {
-	mSpaceTimeUSec = 0;
-	mLastPacketsIn = 0;
-	mLastPacketsOut = 0;
-	mLastPacketsLost = 0;
-	mLandFarClip = DEFAULT_FAR_PLANE;
-
-	if (gNoRender)
+	for (S32 i = 0; i < 8; i++)
 	{
-		return;
+		mEdgeWaterObjects[i] = NULL;
 	}
 
-	for (S32 i = 0; i < 8; i++)
+	if (gNoRender)
 	{
-		mEdgeWaterObjects[i] = NULL;
+		return;
 	}
 
 	LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,4);
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 0fbd177da4b..f0497d25749 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -508,7 +508,6 @@ def construct(self):
                         self.path("libdb-4.2.so")
                         self.path("libcrypto.so.0.9.7")
                         self.path("libssl.so.0.9.7")
-                        self.path("libexpat.so.1")
                         self.path("libstdc++.so.6")
                         self.path("libuuid.so", "libuuid.so.1")
                         self.path("libSDL-1.2.so.0")
-- 
GitLab