From b305a6c575e2b062d4805f2214ad52a7fecf0939 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sat, 25 Mar 2017 15:21:35 -0700 Subject: [PATCH] VertexLoaderTest: fix maybe-uninitialized warning Fixes warning: ``` ../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:222:15: error: variable 'f' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] ExpectOut(f * scale); ^ ../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:12: note: initialize the variable 'f' to silence this warning float f, g; ^ = 0.0 ../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:223:15: error: variable 'g' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] ExpectOut(g * scale); ^ ../Source/UnitTests/VideoCommon/VertexLoaderTest.cpp:198:15: note: initialize the variable 'g' to silence this warning float f, g; ^ = 0.0 ``` --- Source/UnitTests/VideoCommon/VertexLoaderTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp index d96694fbb8..54df13351a 100644 --- a/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp +++ b/Source/UnitTests/VideoCommon/VertexLoaderTest.cpp @@ -218,6 +218,8 @@ TEST_P(VertexLoaderParamTest, PositionAll) f = *iter++; g = *iter++; break; + default: + FAIL() << "Unknown format"; } ExpectOut(f * scale); ExpectOut(g * scale);