Fix compiler warnings

This commit is contained in:
Don Gagne
2014-07-07 15:11:46 -07:00
parent be73ad0bdb
commit 680ebf29c3
7 changed files with 24 additions and 13 deletions
+2
View File
@@ -98,6 +98,8 @@ int test_mathlib(int argc, char *argv[])
TEST_OP("Vector<3> length squared", v1.length_squared());
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
// Need pragma here intead of moving variable out of TEST_OP and just reference because
// TEST_OP measures performance of vector operations.
TEST_OP("Vector<3> element read", volatile float a = v1(0));
TEST_OP("Vector<3> element read direct", volatile float a = v1.data[0]);
#pragma GCC diagnostic pop