Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Unified Diff: mojo/public/cpp/system/tests/macros_unittest.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/system/tests/macros_unittest.cc
diff --git a/mojo/public/cpp/system/tests/macros_unittest.cc b/mojo/public/cpp/system/tests/macros_unittest.cc
index 99b158dabe10dd3a39bcef6827f3c28b35b0c553..f884baaf1866b409fdb07b6696cf4e354970a0a9 100644
--- a/mojo/public/cpp/system/tests/macros_unittest.cc
+++ b/mojo/public/cpp/system/tests/macros_unittest.cc
@@ -67,6 +67,7 @@ static_assert(MOJO_ARRAYSIZE(kGlobalArray) == 5u,
TEST(MacrosCppTest, ArraySize) {
double local_array[4] = {6.7, 7.8, 8.9, 9.0};
+ MOJO_ALLOW_UNUSED_LOCAL(local_array);
jamesr 2014/11/18 00:44:16 this local seems to be used on the next line - no?
Peter Kasting 2014/11/18 00:50:30 MSVC considers something unused if e.g. you only e
EXPECT_EQ(4u, MOJO_ARRAYSIZE(local_array));
}

Powered by Google App Engine
This is Rietveld 408576698