Skip to content

Commit

Permalink
tool_action_test.cc: specify lambda return type
Browse files Browse the repository at this point in the history
A user reported that they were unable to compile tool_action_test.cc on
OS X 10.11 with either the system Clang or thirdparty Clang. It appears
that these toolchains are not able to infer the correct return type for
a lambda. I'm not able to repro the failure, but the original user
confirmed that this patch fixed the issue. Failure:

    /Users/<user>/ProjectFiles/kudu/src/kudu/tools/tool_action_test.cc:384:5: error: return type 'kudu::Status' must match previous return type 'const ::kudu::Status' when lambda
          expression has unspecified explicit return type
        return Status::OK();
        ^
    1 error generated.

Change-Id: I52824e85a37c67bea8a2373264e8198d8d2294f4
Reviewed-on: http://gerrit.cloudera.org:8080/4773
Reviewed-by: Todd Lipcon <[email protected]>
Tested-by: Kudu Jenkins
  • Loading branch information
danburkert committed Oct 20, 2016
1 parent 6bc0753 commit abd8716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kudu/tools/tool_action_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void GeneratorThread(
shared_ptr<KuduSession> session(client->NewSession());
uint64_t idx = 0;

auto generator = [&]() {
auto generator = [&]() -> Status {
RETURN_NOT_OK(session->SetMutationBufferFlushWatermark(
FLAGS_buffer_flush_watermark_pct));
RETURN_NOT_OK(session->SetMutationBufferSpace(
Expand Down

0 comments on commit abd8716

Please sign in to comment.