Skip to content

Commit

Permalink
VertexLoaderTest: fix maybe-uninitialized warning
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
ligfx committed Mar 26, 2017
1 parent 4d8d045 commit 9de92a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/UnitTests/VideoCommon/VertexLoaderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ TEST_P(VertexLoaderParamTest, PositionAll)
f = *iter++;
g = *iter++;
break;
default:
FAIL() << "We shouldn't get here";
}
ExpectOut(f * scale);
ExpectOut(g * scale);
Expand Down

0 comments on commit 9de92a7

Please sign in to comment.