From 9f0592fb73d664cb9a5178f70f6576b58758bbe8 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 13 Nov 2023 17:18:15 -0500
Subject: [PATCH] Some warning fixes

---
 indra/newview/llfasttimerview.cpp        | 2 +-
 indra/newview/llinventorygallerymenu.cpp | 2 +-
 indra/newview/llmodelpreview.cpp         | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 16290f83014..ee9fe7df47a 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -1112,7 +1112,7 @@ void LLFastTimerView::drawLineGraph()
 				cur_max_calls = llmax(cur_max_calls, calls);
 			}
 			F32 x = mGraphRect.mRight - j * (F32)(mGraphRect.getWidth())/(mRecording.getNumRecordedPeriods()-1);
-			F32 y;
+			F32 y = 0.f;
 			switch(mDisplayType)
 {
 			case DISPLAY_TIME:
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index bfa87a9834d..e0bcd84a526 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -243,7 +243,7 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata)
         {
             LLVector3d global_pos;
             landmark->getGlobalPos(global_pos);
-            boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](const std::string& slurl)
+            boost::function<void(std::string& slurl)> copy_slurl_to_clipboard_cb = [](std::string& slurl)
             {
                gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(slurl));
                LLSD args;
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 834ad02aaa4..1bed4977f1f 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -2759,6 +2759,10 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
             m = m.inverse().transpose();
             mat_normal.loadu(m.m);
         }
+        else
+        {
+            mat_normal.setIdentity();
+        }
 
         S32 num_faces = mdl->getNumVolumeFaces();
         for (S32 i = 0; i < num_faces; ++i)
-- 
GitLab