From ce233c8872cb811551b7d34fb949b476aa56ed98 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 5 Apr 2021 14:31:57 -0400
Subject: [PATCH] Fix a few W4 warnings

---
 indra/llcommon/llerror.cpp      | 18 +++++++++---------
 indra/llcommon/llfindlocale.cpp | 10 ----------
 2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 8de17fdb3a2..f8a7d7e5013 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -95,7 +95,7 @@ namespace {
 		}
 	}
 #else
-	class RecordToSyslog : public LLError::Recorder
+	class RecordToSyslog final : public LLError::Recorder
 	{
 	public:
 		RecordToSyslog(const std::string& identity)
@@ -136,7 +136,7 @@ namespace {
 	};
 #endif
 
-	class RecordToFile : public LLError::Recorder
+	class RecordToFile final : public LLError::Recorder
 	{
 	public:
 		RecordToFile(const std::string& filename):
@@ -195,7 +195,7 @@ namespace {
 	};
 	
 	
-	class RecordToStderr : public LLError::Recorder
+	class RecordToStderr final : public LLError::Recorder
 	{
 	public:
 		RecordToStderr(bool timestamp) : mUseANSI(checkANSI()) 
@@ -300,7 +300,7 @@ namespace {
 		}
 	};
 
-	class RecordToFixedBuffer : public LLError::Recorder
+	class RecordToFixedBuffer final : public LLError::Recorder
 	{
 	public:
 		RecordToFixedBuffer(LLLineBuffer* buffer)
@@ -327,7 +327,7 @@ namespace {
 	};
 
 #if LL_WINDOWS
-	class RecordToWinDebug: public LLError::Recorder
+	class RecordToWinDebug final : public LLError::Recorder
 	{
 	public:
 		RecordToWinDebug()
@@ -672,7 +672,7 @@ namespace LLError
 					const std::type_info& class_info, 
 					const char* function, 
 					bool printOnce,
-					const char** tags, 
+					const char** tags_in, 
 					size_t tag_count)
 	:	mLevel(level), 
 		mFile(file), 
@@ -712,11 +712,11 @@ namespace LLError
 
 		for (int i = 0; i < tag_count; i++)
 		{
-            if (strchr(tags[i], ' '))
+            if (strchr(tags_in[i], ' '))
             {
                 LL_ERRS() << "Space is not allowed in a log tag at " << mLocationString << LL_ENDL;
             }
-			mTags[i] = tags[i];
+			mTags[i] = tags_in[i];
 		}
 
         mTagString.append("#");
@@ -730,7 +730,7 @@ namespace LLError
 
 	CallSite::~CallSite()
 	{
-		delete []mTags;
+		delete[] mTags;
 	}
 
 	void CallSite::invalidate()
diff --git a/indra/llcommon/llfindlocale.cpp b/indra/llcommon/llfindlocale.cpp
index 493a72493bb..1b2c8125e70 100644
--- a/indra/llcommon/llfindlocale.cpp
+++ b/indra/llcommon/llfindlocale.cpp
@@ -140,16 +140,6 @@ accumulate_locstring(const char *str, FL_Locale *l) {
 }
 
 
-static int
-accumulate_env(const char *name, FL_Locale *l) {
-  char* env = getenv(name);
-  if (env) {
-    return accumulate_locstring(env, l);
-  }
-  return 0;
-}
-
-
 static void
 canonise_fl(FL_Locale *l) {
   /* this function fixes some common locale-specifying mistakes */
-- 
GitLab