diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index eee6171..cc6468f 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -10,7 +10,7 @@ "defines": [], "compilerPath": "/usr/bin/gcc", "cStandard": "c11", - "cppStandard": "c++17", + "cppStandard": "c++11", "intelliSenseMode": "clang-x64" } ], diff --git a/include/dap/optional.h b/include/dap/optional.h index 77b0587..deab3f7 100644 --- a/include/dap/optional.h +++ b/include/dap/optional.h @@ -17,6 +17,7 @@ #include #include +#include // std::move namespace dap { diff --git a/include/dap/serialization.h b/include/dap/serialization.h index dbb4e68..95fcb56 100644 --- a/include/dap/serialization.h +++ b/include/dap/serialization.h @@ -18,6 +18,7 @@ #include "typeof.h" #include "types.h" +#include // ptrdiff_t #include namespace dap { diff --git a/src/any_test.cpp b/src/any_test.cpp index 35b92d5..d52ff05 100644 --- a/src/any_test.cpp +++ b/src/any_test.cpp @@ -78,10 +78,10 @@ TEST(Any, Object) { ASSERT_TRUE(any.is()); if (any.is()) { auto got = any.get(); - ASSERT_EQ(got.size(), 3); - ASSERT_EQ(got.count("one"), 1); - ASSERT_EQ(got.count("two"), 1); - ASSERT_EQ(got.count("three"), 1); + ASSERT_EQ(got.size(), 3U); + ASSERT_EQ(got.count("one"), 1U); + ASSERT_EQ(got.count("two"), 1U); + ASSERT_EQ(got.count("three"), 1U); ASSERT_TRUE(got["one"].is()); ASSERT_TRUE(got["two"].is()); ASSERT_TRUE(got["three"].is()); diff --git a/src/io.cpp b/src/io.cpp index 00665dd..7e3a52f 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -18,6 +18,7 @@ #include #include #include +#include // strlen #include #include diff --git a/src/session_test.cpp b/src/session_test.cpp index 247c8a4..04409e5 100644 --- a/src/session_test.cpp +++ b/src/session_test.cpp @@ -179,7 +179,7 @@ TEST_F(SessionTest, Request) { ASSERT_EQ(received.i, request.i); ASSERT_EQ(received.n, request.n); ASSERT_EQ(received.a, request.a); - ASSERT_EQ(received.o.size(), 3); + ASSERT_EQ(received.o.size(), 3U); ASSERT_EQ(received.o["a"].get(), request.o["a"].get()); ASSERT_EQ(received.o["b"].get(), @@ -208,7 +208,7 @@ TEST_F(SessionTest, RequestResponseSuccess) { ASSERT_EQ(got.response.i, dap::integer(99)); ASSERT_EQ(got.response.n, dap::number(123.456)); ASSERT_EQ(got.response.a, dap::array({5, 4, 3, 2, 1})); - ASSERT_EQ(got.response.o.size(), 3); + ASSERT_EQ(got.response.o.size(), 3U); ASSERT_EQ(got.response.o["one"].get(), dap::integer(1)); ASSERT_EQ(got.response.o["two"].get(), dap::number(2)); ASSERT_EQ(got.response.o["three"].get(), dap::string("3")); @@ -267,7 +267,7 @@ TEST_F(SessionTest, ResponseSentHandlerSuccess) { ASSERT_EQ(got.response.i, dap::integer(99)); ASSERT_EQ(got.response.n, dap::number(123.456)); ASSERT_EQ(got.response.a, dap::array({5, 4, 3, 2, 1})); - ASSERT_EQ(got.response.o.size(), 3); + ASSERT_EQ(got.response.o.size(), 3U); ASSERT_EQ(got.response.o["one"].get(), dap::integer(1)); ASSERT_EQ(got.response.o["two"].get(), dap::number(2)); ASSERT_EQ(got.response.o["three"].get(), dap::string("3")); @@ -308,7 +308,7 @@ TEST_F(SessionTest, Event) { ASSERT_EQ(got.i, event.i); ASSERT_EQ(got.n, event.n); ASSERT_EQ(got.a, event.a); - ASSERT_EQ(got.o.size(), 3); + ASSERT_EQ(got.o.size(), 3U); ASSERT_EQ(got.o["a"].get(), event.o["a"].get()); ASSERT_EQ(got.o["b"].get(), event.o["b"].get()); ASSERT_EQ(got.o["c"].get(), event.o["c"].get());