diff --git a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp index dd82385092..527407aaa8 100644 --- a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp +++ b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp @@ -293,7 +293,7 @@ namespace MCore // check if the test point is inside the polygon AZ::Vector2 ClosestPointToPoly(const AZ::Vector2* polyPoints, size_t numPoints, const AZ::Vector2& testPoint) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); float closestDist = FLT_MAX; for (size_t i = 0; i < numPoints; ++i) { diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 3476c530b2..9a97f27592 100644 --- a/Gems/LyShine/Code/Source/Draw2d.cpp +++ b/Gems/LyShine/Code/Source/Draw2d.cpp @@ -497,7 +497,7 @@ void CDraw2d::SetSortKey(int64_t key) AZ::Vector2 CDraw2d::Align(AZ::Vector2 position, AZ::Vector2 size, HAlign horizontalAlignment, VAlign verticalAlignment) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); switch (horizontalAlignment) { case HAlign::Left: diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index e18a9cefe2..698dcc2b5e 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -4936,7 +4936,7 @@ AZStd::string UiTextComponent::GetLocalizedText([[maybe_unused]] const AZStd::st //////////////////////////////////////////////////////////////////////////////////////////////////// AZ::Vector2 UiTextComponent::CalculateAlignedPositionWithYOffset(const UiTransformInterface::RectPoints& points) { - AZ::Vector2 pos; + AZ::Vector2 pos = AZ::Vector2::CreateZero(); const DrawBatchLines& drawBatchLines = GetDrawBatchLines(); size_t numLinesOfText = drawBatchLines.batchLines.size(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp index 0b2b4f3bcc..490fc1eb94 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp @@ -200,7 +200,7 @@ namespace ScriptCanvasEditor AZ::TypeId DataTypePaletteModel::FindTypeIdForIndex(const QModelIndex& index) const { - AZ::TypeId retVal; + AZ::TypeId retVal = AZ::TypeId::CreateNull(); if (index.row() >= 0 && index.row() < m_variableTypes.size()) {