diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-30 15:41:36 +0200 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-05-30 15:41:36 +0200 |
commit | cb3bd8865aa0f9fb8a247ea595cf1973057ba91f (patch) | |
tree | 5694572bbbb030ab1bd547455c4215034cf120de /indra/llcommon | |
parent | c082f6f67a6dcd3437d1f2413932fef8cdf7de07 (diff) |
Fix a bunch of uninitialized variable warnings that showed up in Visual Studio
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llfasttimer.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llfile.h | 4 | ||||
-rw-r--r-- | indra/llcommon/llsingleton.h | 1 | ||||
-rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 6 |
4 files changed, 7 insertions, 6 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 17ad37b031..09fcf8a1af 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -215,7 +215,7 @@ private: private: U64 mStartTime; - BlockTimerStackRecord mParentTimerData; + BlockTimerStackRecord mParentTimerData{}; public: // statics diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 08a008c19a..2564671b13 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -97,7 +97,7 @@ public: // no copy LLUniqueFile(const LLUniqueFile&) = delete; // move construction - LLUniqueFile(LLUniqueFile&& other) + LLUniqueFile(LLUniqueFile&& other) noexcept { mFileHandle = other.mFileHandle; other.mFileHandle = nullptr; @@ -118,7 +118,7 @@ public: // copy assignment deleted LLUniqueFile& operator=(const LLUniqueFile&) = delete; // move assignment - LLUniqueFile& operator=(LLUniqueFile&& other) + LLUniqueFile& operator=(LLUniqueFile&& other) noexcept { close(); std::swap(mFileHandle, other.mFileHandle); diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 61f82a4c03..0a7086e819 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -528,6 +528,7 @@ public: classname<DERIVED_TYPE>(), " -- creating new instance"}); // fall through + [[fallthrough]]; case UNINITIALIZED: case QUEUED: // QUEUED means some secondary thread has already requested an diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 692bbe5acf..ba7acf9547 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -522,9 +522,9 @@ namespace LLTrace struct BlockTimerStackRecord { - class BlockTimer* mActiveTimer; - class BlockTimerStatHandle* mTimeBlock; - U64 mChildTime; + class BlockTimer* mActiveTimer{ nullptr }; + class BlockTimerStatHandle* mTimeBlock{ nullptr }; + U64 mChildTime{ 0 }; }; struct AccumulatorBufferGroup : public LLRefCount |