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

Unified Diff: base/allocator/allocator_unittest.cc

Issue 415773009: Re-enable various MSVC warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 months 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
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_unittest.cc
diff --git a/base/allocator/allocator_unittest.cc b/base/allocator/allocator_unittest.cc
index eb20b38ab6156f640d938edfe28914146ac3e15e..a39b8384452bdf8bdf7247bda4c1a88b5d8c4d58 100644
--- a/base/allocator/allocator_unittest.cc
+++ b/base/allocator/allocator_unittest.cc
@@ -287,6 +287,13 @@ static void TestCalloc(size_t n, size_t s, bool ok) {
}
}
+// MSVC C4530 complains about exception handler usage when exceptions are
+// disabled. Temporarily disable that warning so we can test that they are, in
+// fact, disabled.
+#if defined(OS_WIN)
+#pragma warning(push)
+#pragma warning(disable: 4530)
+#endif
// A global test counter for number of times the NewHandler is called.
static int news_handled = 0;
@@ -331,6 +338,10 @@ static void TestNothrowNew(void* (*func)(size_t)) {
std::set_new_handler(saved_handler);
}
+#if defined(OS_WIN)
+#pragma warning(pop)
+#endif
+
} // namespace
//-----------------------------------------------------------------------------
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698