From d6fe55fe6fa45e5f28127ecd94fcfa7d978dcad6 Mon Sep 17 00:00:00 2001 From: Igor Sugak Date: Mon, 2 Oct 2017 13:42:09 -0700 Subject: [PATCH] fix -Wvexing-parse Summary: ```lang=cpp folly/test/stl_tests/StlVectorTest.cpp:1975:11: error: parentheses were disambiguated as redundant parentheses around declaration of variable named 'm' [-Werror,-Wvexing-parse] Vector(m); ^~~ folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: add a variable name to declare a 'Vector' initialized with 'm' Vector(m); ^ varname folly/test/stl_tests/StlVectorTest.cpp:1975:5: note: add enclosing parentheses to perform a function-style cast Vector(m); ^ ( ) folly/test/stl_tests/StlVectorTest.cpp:1975:11: note: remove parentheses to silence this warning Vector(m); ^ ~ 1 error generated. ``` Reviewed By: Gownta Differential Revision: D5955613 fbshipit-source-id: 3015570ce111603b3561914d07b55365a221c686 --- folly/test/stl_tests/StlVectorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/stl_tests/StlVectorTest.cpp b/folly/test/stl_tests/StlVectorTest.cpp index b80b8dfe..b107cd98 100644 --- a/folly/test/stl_tests/StlVectorTest.cpp +++ b/folly/test/stl_tests/StlVectorTest.cpp @@ -1972,7 +1972,7 @@ STL_TEST("23.2.1 Table 99.4", customAllocator, is_destructible, m) { ASSERT_TRUE(u.get_allocator() == m); if (false) { - Vector(m); + Vector t(m); } } -- 2.34.1