From 99b6d6e79890c652741b6911c95c52184aaffa9b Mon Sep 17 00:00:00 2001 From: Cort Date: Wed, 4 Oct 2017 16:47:04 -0400 Subject: [PATCH] Fix potentially uninitialized return value warnings --- glm/gtc/matrix_access.inl | 2 +- glm/gtc/quaternion.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/gtc/matrix_access.inl b/glm/gtc/matrix_access.inl index dd307a01..520a112d 100644 --- a/glm/gtc/matrix_access.inl +++ b/glm/gtc/matrix_access.inl @@ -28,7 +28,7 @@ namespace glm { assert(index >= 0 && index < m[0].length()); - typename genType::row_type Result; + typename genType::row_type Result = {}; for(length_t i = 0; i < m.length(); ++i) Result[i] = m[i][index]; return Result; diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 5314d1fa..aaefd8a1 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -669,7 +669,7 @@ namespace detail T biggestVal = sqrt(fourBiggestSquaredMinus1 + static_cast(1)) * static_cast(0.5); T mult = static_cast(0.25) / biggestVal; - tquat Result; + tquat Result = {}; switch(biggestIndex) { case 0: