diff --git a/Library/MeterHistogram.cpp b/Library/MeterHistogram.cpp index 10103bf93..c8c790a39 100644 --- a/Library/MeterHistogram.cpp +++ b/Library/MeterHistogram.cpp @@ -20,18 +20,18 @@ MeterHistogram::MeterHistogram(Skin* skin, const WCHAR* name) : Meter(skin, name m_PrimaryColor(D2D1::ColorF(D2D1::ColorF::Green)), m_SecondaryColor(D2D1::ColorF(D2D1::ColorF::Red)), m_OverlapColor(D2D1::ColorF(D2D1::ColorF::Yellow)), - m_MeterPos(), + m_MeterPos(0), m_Autoscale(false), m_Flip(false), m_PrimaryImage(L"PrimaryImage", c_PrimaryOptionArray, false, skin), m_SecondaryImage(L"SecondaryImage", c_SecondaryOptionArray, false, skin), m_OverlapImage(L"BothImage", c_BothOptionArray, false, skin), - m_PrimaryValues(), - m_SecondaryValues(), + m_PrimaryValues(nullptr), + m_SecondaryValues(nullptr), m_MaxPrimaryValue(1.0), - m_MinPrimaryValue(), + m_MinPrimaryValue(0.0), m_MaxSecondaryValue(1.0), - m_MinSecondaryValue(), + m_MinSecondaryValue(0.0), m_SizeChanged(true), m_GraphStartLeft(false), m_GraphHorizontalOrientation(false) @@ -372,7 +372,7 @@ bool MeterHistogram::Draw(Gfx::Canvas& canvas) int displayH = (int)(meterRect.bottom - meterRect.top); // Default values (GraphStart=Right, GraphOrientation=Vertical) - int i; + int i = 0; int startValue = 0; int* endValueLHS = &i; int* endValueRHS = &displayW; diff --git a/Library/MeterLine.cpp b/Library/MeterLine.cpp index 1c3766005..1acd9d942 100644 --- a/Library/MeterLine.cpp +++ b/Library/MeterLine.cpp @@ -20,7 +20,7 @@ MeterLine::MeterLine(Skin* skin, const WCHAR* name) : Meter(skin, name), m_LineWidth(1.0), m_HorizontalColor(D2D1::ColorF(D2D1::ColorF::Black)), m_StrokeType(D2D1_STROKE_TRANSFORM_TYPE_NORMAL), - m_CurrentPos(), + m_CurrentPos(0), m_GraphStartLeft(false), m_GraphHorizontalOrientation(false) { @@ -84,7 +84,7 @@ void MeterLine::Initialize() */ void MeterLine::ReadOptions(ConfigParser& parser, const WCHAR* section) { - WCHAR tmpName[64]; + WCHAR tmpName[64] = { 0 }; // Store the current number of lines so we know if the buffer needs to be updated int oldLineCount = (int)m_Colors.size(); diff --git a/Library/MeterRoundLine.cpp b/Library/MeterRoundLine.cpp index 458773da5..89818e41e 100644 --- a/Library/MeterRoundLine.cpp +++ b/Library/MeterRoundLine.cpp @@ -84,7 +84,7 @@ bool MeterRoundLine::Update() } Measure* measure = m_Measures[0]; - if (m_ValueRemainder > 0) + if (m_ValueRemainder > 0U) { LONGLONG time = (LONGLONG)measure->GetValue(); m_Value = (double)(time % m_ValueRemainder);