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, |