diff --git a/src/command_line.cc b/src/command_line.cc index 0fbd2a3a..9869af67 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -2626,7 +2626,6 @@ bool QueryDbMainLoop( } case IpcId::CqueryQueryDbWaitForIdleIndexer: { - auto msg = static_cast(message.get()); LOG_S(INFO) << "Waiting for idle"; int idle_count = 0; while (true) { diff --git a/src/language_server_api.cc b/src/language_server_api.cc index 9fa9dd7c..c25b0af7 100644 --- a/src/language_server_api.cc +++ b/src/language_server_api.cc @@ -40,10 +40,10 @@ optional ReadJsonRpcContentFrom(std::function()> rea if (exit_seq == 0 && c == '\r') ++exit_seq; if (exit_seq == 1 && c == '\n') break; - + stringified_content_length += c; } - constexpr char* kContentLengthStart = "Content-Length: "; + const char* kContentLengthStart = "Content-Length: "; assert(StartsWith(stringified_content_length, kContentLengthStart)); int content_length = atoi(stringified_content_length.c_str() + strlen(kContentLengthStart)); @@ -68,14 +68,15 @@ optional ReadJsonRpcContentFrom(std::function()> rea } content += *c; } - + return content; } TEST_SUITE("FindIncludeLine"); -auto MakeContentReader(std::string* content, bool can_be_empty) { - return [=]() -> optional { +std::function()> + MakeContentReader(std::string* content, bool can_be_empty) { + return [content, can_be_empty]() -> optional { if (!can_be_empty) REQUIRE(!content->empty()); if (content->empty()) @@ -87,14 +88,14 @@ auto MakeContentReader(std::string* content, bool can_be_empty) { } TEST_CASE("ReadContentFromSource") { - auto parse_correct = [](std::string content) { + auto parse_correct = [](std::string content) -> std::string { auto reader = MakeContentReader(&content, false /*can_be_empty*/); auto got = ReadJsonRpcContentFrom(reader); REQUIRE(got); return got.value(); }; - auto parse_incorrect = [](std::string content) { + auto parse_incorrect = [](std::string content) -> optional { auto reader = MakeContentReader(&content, true /*can_be_empty*/); return ReadJsonRpcContentFrom(reader); }; diff --git a/wscript b/wscript index cf904caf..3c767d16 100644 --- a/wscript +++ b/wscript @@ -24,7 +24,7 @@ global CLANG_PLATFORM_NAME global CLANG_TARBALL_PLATFORM_NAME if sys.platform == 'linux' or sys.platform == 'linux2': - CLANG_PLATFORM_NAME = 'linux-x86_64-gnu-ubuntu14.04' + CLANG_PLATFORM_NAME = 'linux-x86_64-ubuntu14.04' CLANG_TARBALL_PLATFORM_NAME = 'clang+llvm' elif sys.platform == 'darwin': CLANG_PLATFORM_NAME = 'x86_64-apple-darwin'