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

Unified Diff: test/cctest/test-serialize.cc

Issue 543087: Fix build problems. (Closed)
Patch Set: Created 10 years, 11 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 | test/mjsunit/regress/regress-crbug-3184.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 94b741c38ad29541b079ff606f18bff397e2f4a9..348150d01d3b369cfa37f3b01a846541b2a154de 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -364,6 +364,10 @@ DEPENDENT_TEST(PartialDeserialization, PartialSerialization) {
FILE* fp = OS::FOpen(name.start(), "ra");
int new_size, pointer_size, data_size, code_size, map_size, cell_size;
int large_size;
+#ifdef _MSC_VER
Erik Corry 2010/01/15 20:14:10 Can you add here a comment saying // Avoid warning
+ // Please note that this is only fine if %c and %s are not being used.
+#define fscanf fscanf_s
+#endif
CHECK_EQ(1, fscanf(fp, "new %d\n", &new_size));
CHECK_EQ(1, fscanf(fp, "pointer %d\n", &pointer_size));
CHECK_EQ(1, fscanf(fp, "data %d\n", &data_size));
@@ -371,6 +375,9 @@ DEPENDENT_TEST(PartialDeserialization, PartialSerialization) {
CHECK_EQ(1, fscanf(fp, "map %d\n", &map_size));
CHECK_EQ(1, fscanf(fp, "cell %d\n", &cell_size));
CHECK_EQ(1, fscanf(fp, "large %d\n", &large_size));
+#ifdef _MSC_VER
+#undef fscanf
+#endif
fclose(fp);
Heap::ReserveSpace(new_size,
pointer_size,
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-3184.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698