From fb5a29c069d27611b6328fbc313382ef0914ffe9 Mon Sep 17 00:00:00 2001
From: Monty Brandenberg <monty@lindenlab.com>
Date: Fri, 1 Jun 2012 23:06:24 +0000
Subject: [PATCH] Platform fixups Linux:  unused variables, make error strings
 constant.

---
 indra/llcommon/llsdserialize.cpp         |  5 ++++-
 indra/llcommon/tests/bitpack_test.cpp    |  1 +
 indra/llcommon/tests/reflection_test.cpp |  2 +-
 indra/llcorehttp/httpcommon.cpp          |  2 +-
 indra/llmessage/llhttpassetstorage.cpp   |  2 +-
 indra/newview/lltexturefetch.cpp         | 10 +++++-----
 6 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index bf626005143..f29c96f17c7 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -1447,9 +1447,12 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
 	}
 
 	case LLSD::TypeUUID:
+	{
 		ostr.put('u');
-		ostr.write((const char*)(&(data.asUUID().mData)), UUID_BYTES);
+		LLSD::UUID value = data.asUUID();
+		ostr.write((const char*)(&value.mData), UUID_BYTES);
 		break;
+	}
 
 	case LLSD::TypeString:
 		ostr.put('s');
diff --git a/indra/llcommon/tests/bitpack_test.cpp b/indra/llcommon/tests/bitpack_test.cpp
index 05289881d00..4c3bc674af9 100644
--- a/indra/llcommon/tests/bitpack_test.cpp
+++ b/indra/llcommon/tests/bitpack_test.cpp
@@ -95,6 +95,7 @@ namespace tut
 		ensure("bitPack: individual unpack: 5", unpackbuffer[0] == (U8) str[5]);
 		unpack_bufsize = bitunpack.bitUnpack(unpackbuffer, 8*4); // Life
 		ensure_memory_matches("bitPack: 4 bytes unpack:", unpackbuffer, 4, str+6, 4);
+		ensure("keep compiler quiet", unpack_bufsize == unpack_bufsize);
 	}
 
 	// U32 packing
diff --git a/indra/llcommon/tests/reflection_test.cpp b/indra/llcommon/tests/reflection_test.cpp
index 59491cd1fe2..8980ebb1f1d 100644
--- a/indra/llcommon/tests/reflection_test.cpp
+++ b/indra/llcommon/tests/reflection_test.cpp
@@ -207,7 +207,7 @@ namespace tut
 			const LLReflective* reflective = property->get(aggregated_data); // Wrong reflective type, should throw exception.
 
 			// useless op to get rid of compiler warning.
-			reflective = NULL;
+			reflective = reflective;
 		}
 		catch(...)
 		{
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 273acae132f..a01182cf231 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -73,7 +73,7 @@ std::string HttpStatus::toString() const
 	static const struct
 	{
 		type_enum_t		mCode;
-		char *			mText;
+		const char *	mText;
 	}
 	http_errors[] =
 		{
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 612d765969e..d6ed08055e7 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -749,7 +749,7 @@ LLAssetRequest* LLHTTPAssetStorage::findNextRequest(LLAssetStorage::request_list
 	request_list_t::iterator pending_iter = pending.begin();
 	request_list_t::iterator pending_end  = pending.end();
 	// Loop over all pending requests until we miss finding it in the running list.
-	for (; pending_iter != pending.end(); ++pending_iter)
+	for (; pending_iter != pending_end; ++pending_iter)
 	{
 		LLAssetRequest* req = *pending_iter;
 		// Look for this pending request in the running list.
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 381364b5c32..daad463e0d7 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1065,13 +1065,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
 			//1, not openning too many file descriptors at the same time;
 			//2, control the traffic of http so udp gets bandwidth.
 			//
-			static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8;
+			// static const S32 MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE = 8;
 			// *FIXME:  For the moment, allow everything to transition into HTTP
 			// and have the new library order and throttle.
-			//if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE)
-			//{
-			//return false ; //wait.
-			//}
+			// if(mFetcher->getNumHTTPRequests() > MAX_NUM_OF_HTTP_REQUESTS_IN_QUEUE)
+			// {
+			//  return false ; //wait.
+			// }
 
 			mFetcher->removeFromNetworkQueue(this, false);
 			
-- 
GitLab