From 90176a81c14451f275d9fa1bcf55f8ca41708bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Sat, 8 Oct 2016 19:39:35 +0100 Subject: [PATCH 1/2] inspector,test: zero out expectations Visual Studio 2013 does not zero out the structure when allocating. --- test/cctest/test_inspector_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cctest/test_inspector_socket.cc b/test/cctest/test_inspector_socket.cc index 3b927bdc2c7252..a5d6b0b4f93624 100644 --- a/test/cctest/test_inspector_socket.cc +++ b/test/cctest/test_inspector_socket.cc @@ -248,7 +248,7 @@ static void setup_inspector_expecting() { if (inspector.data) { return; } - expectations* expects = new expectations(); + expectations* expects = new expectations({}); inspector.data = expects; inspector_read_start(&inspector, grow_expects_buffer, save_read_data); } From 94ecacd149131445ceb867b71a844d1cc553a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Mon, 10 Oct 2016 12:36:39 +0100 Subject: [PATCH 2/2] fixup: comment --- test/cctest/test_inspector_socket.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cctest/test_inspector_socket.cc b/test/cctest/test_inspector_socket.cc index a5d6b0b4f93624..20469b90c4dcb2 100644 --- a/test/cctest/test_inspector_socket.cc +++ b/test/cctest/test_inspector_socket.cc @@ -248,6 +248,7 @@ static void setup_inspector_expecting() { if (inspector.data) { return; } + // ({}) is needed because VS2013 does not zero the struct with () expectations* expects = new expectations({}); inspector.data = expects; inspector_read_start(&inspector, grow_expects_buffer, save_read_data);