diff options
| author | Rye <rye@alchemyviewer.org> | 2025-10-26 03:03:32 -0400 |
|---|---|---|
| committer | Rye <rye@alchemyviewer.org> | 2025-10-27 04:59:15 -0400 |
| commit | bd3a7c9b3a7d1023c4ab87d876860552fd039747 (patch) | |
| tree | ef00d3c26b0a675fe60b8303b107d0b102670128 | |
| parent | 6ee3f9606ae4f1192e5eb71b42f3f0596f66caa6 (diff) | |
Fix uninitialized member variables reported by ubsan
Signed-off-by: Rye <rye@alchemyviewer.org>
| -rw-r--r-- | indra/llui/llemojihelper.h | 2 | ||||
| -rw-r--r-- | indra/llui/llfloater.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llfloaterregioninfo.h | 4 | ||||
| -rw-r--r-- | indra/newview/lllocationinputctrl.h | 4 | ||||
| -rw-r--r-- | indra/newview/llmaterialmgr.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llmediactrl.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llmediactrl.h | 1 | ||||
| -rw-r--r-- | indra/newview/lloutfitgallery.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/lloutfitobserver.h | 2 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.h | 4 |
10 files changed, 15 insertions, 15 deletions
diff --git a/indra/llui/llemojihelper.h b/indra/llui/llemojihelper.h index 26840eef94..0dc74b1a74 100644 --- a/indra/llui/llemojihelper.h +++ b/indra/llui/llemojihelper.h @@ -69,5 +69,5 @@ private: boost::signals2::connection mHelperCommitConn; boost::signals2::connection mHelperCloseConn; std::function<void(llwchar)> mEmojiCommitCb; - bool mIsHideDisabled; + bool mIsHideDisabled = false; }; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 52a5e3dbd6..f609fe8105 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -248,6 +248,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mShortTitle(p.short_title), mSingleInstance(p.single_instance), mReuseInstance(p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance), // reuse single-instance floaters by default + mIsReuseInitialized(p.reuse_instance.isProvided()), mKey(key), mCanTearOff(p.can_tear_off), mCanMinimize(p.can_minimize), @@ -3351,6 +3352,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p) mLegacyHeaderHeight = p.legacy_header_height; mSingleInstance = p.single_instance; mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance; + mIsReuseInitialized = p.reuse_instance.isProvided(); mDefaultRelativeX = p.rel_x; mDefaultRelativeY = p.rel_y; diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index a8631c36ca..f9812b3e85 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -514,8 +514,8 @@ private: void searchAgent(LLNameListCtrl* listCtrl, const std::string& search_string); void copyListToClipboard(std::string list_name); - bool mPendingUpdate; - bool mCtrlsEnabled; + bool mPendingUpdate = false; + bool mCtrlsEnabled = false; }; #endif diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 56e5555ba5..7a62f96064 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -194,7 +194,7 @@ private: boost::signals2::connection mLocationHistoryConnection; boost::signals2::connection mRegionCrossingSlot; LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot; - bool mIsNavMeshDirty; + bool mIsNavMeshDirty = false; LLUIImage* mLandmarkImageOn; LLUIImage* mLandmarkImageOff; LLPointer<LLUIImage> mIconMaturityGeneral; @@ -206,7 +206,7 @@ private: std::string mEditLandmarkTooltip; // this field holds a human-readable form of the location string, it is needed to be able to compare copy-pated value and real location std::string mHumanReadableLocation; - bool isHumanReadableLocationVisible; + bool isHumanReadableLocationVisible = false; std::string mMaturityHelpTopic; }; diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index ee5e5b438e..ad2b35548c 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -549,11 +549,11 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) { llassert(response_data.isArray()); LL_DEBUGS("Materials") << "response has "<< response_data.size() << " materials" << LL_ENDL; +#ifdef SHOW_ASSERT // same condition that controls llassert() for (LLSD::array_const_iterator faceIter = response_data.beginArray(); faceIter != response_data.endArray(); ++faceIter) { -# ifdef SHOW_ASSERT // same condition that controls llassert() const LLSD& face_data = *faceIter; // conditional to avoid unused variable warning -# endif + llassert(face_data.isMap()); llassert(face_data.has(MATERIALS_CAP_OBJECT_ID_FIELD)); @@ -570,6 +570,7 @@ void LLMaterialMgr::onPutResponse(bool success, const LLSD& content) // *TODO: do we really still need to process this? } +#endif } } diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index c7b60b2fd5..809628cf6c 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -1030,10 +1030,6 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) case MEDIA_EVENT_NAVIGATE_COMPLETE: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_COMPLETE, result string is: " << self->getNavigateResultString() << LL_ENDL; - if(mHidingInitialLoad) - { - mHidingInitialLoad = false; - } }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index a644ef3071..d2735a009b 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -202,7 +202,6 @@ public: mStretchToFill, mMaintainAspectRatio, mHideLoading, - mHidingInitialLoad, mClearCache, mHoverTextChanged, mDecoupleTextureSize, diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 8589afae06..8a070babcd 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -988,6 +988,8 @@ LLOutfitGalleryItem::LLOutfitGalleryItem(const Params& p) mSelected(false), mWorn(false), mDefaultImage(true), + mHidden(false), + mFavorite(false), mOutfitName(""), mUUID(LLUUID()) { diff --git a/indra/newview/lloutfitobserver.h b/indra/newview/lloutfitobserver.h index ebf0ba1a12..431f37f78c 100644 --- a/indra/newview/lloutfitobserver.h +++ b/indra/newview/lloutfitobserver.h @@ -75,7 +75,7 @@ protected: S32 mBaseOutfitLastVersion; std::string mLastBaseOutfitName; - bool mLastOutfitDirtiness; + bool mLastOutfitDirtiness = false; LLUUID mItemNameHash; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1e563c4869..5c062870a0 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1017,7 +1017,7 @@ public: void startTyping() { mTyping = true; mTypingTimer.reset(); } void stopTyping() { mTyping = false; } private: - bool mVisibleChat; + bool mVisibleChat = false; //-------------------------------------------------------------------- // Lip synch morphs @@ -1199,7 +1199,7 @@ public: static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) protected: S32 getUnbakedPixelAreaRank(); - bool mHasGrey; + bool mHasGrey = false; private: F32 mMinPixelArea; F32 mMaxPixelArea; |
