Commit 80ab360d by Nicolas Capens Committed by Nicolas Capens

Fix braces warning treated as error.

On some platforms, nested braces are required for nested initializers, or a warning will be produced which is treated as an error. Change-Id: I4806ee13869bfe5c5c41505552cd03ff6bdde85e Reviewed-on: https://swiftshader-review.googlesource.com/20248Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 378c4346
......@@ -165,6 +165,7 @@ else()
set_cpp_flag("-Wall")
set_cpp_flag("-Werror=reorder")
set_cpp_flag("-Werror=sign-compare")
set_cpp_flag("-Werror=missing-braces")
set_cpp_flag("-fno-exceptions")
# Remove xor, and, or and friends from the list of keywords, they are used
......
......@@ -612,18 +612,18 @@ TEST_F(SwiftShaderTest, AttributeLocation)
EXPECT_NE(linkStatus, 0);
EXPECT_GLENUM_EQ(GL_NONE, glGetError());
float vertices[18] = { -1.0f, 1.0f, 0.5f,
-1.0f, -1.0f, 0.5f,
1.0f, -1.0f, 0.5f,
-1.0f, 1.0f, 0.5f,
1.0f, -1.0f, 0.5f,
1.0f, 1.0f, 0.5f };
float attributes[5][4] = { 1.0f, 2.0f, 3.0f, 4.0f,
5.0f, 6.0f, 7.0f, 8.0f,
9.0f, 10.0f, 11.0f, 12.0f,
13.0f, 14.0f, 15.0f, 16.0f,
17.0f, 18.0f, 19.0f, 20.0f };
float vertices[6][3] = { { -1.0f, 1.0f, 0.5f },
{ -1.0f, -1.0f, 0.5f },
{ 1.0f, -1.0f, 0.5f },
{ -1.0f, 1.0f, 0.5f },
{ 1.0f, -1.0f, 0.5f },
{ 1.0f, 1.0f, 0.5f } };
float attributes[5][4] = { { 1.0f, 2.0f, 3.0f, 4.0f },
{ 5.0f, 6.0f, 7.0f, 8.0f },
{ 9.0f, 10.0f, 11.0f, 12.0f },
{ 13.0f, 14.0f, 15.0f, 16.0f },
{ 17.0f, 18.0f, 19.0f, 20.0f } };
GLint a0 = glGetAttribLocation(ph.program, "a0");
EXPECT_EQ(a0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment