Skip to content

Commit

Permalink
src: fix compiler warning in env.cc
Browse files Browse the repository at this point in the history
     ../src/env.cc:1227:22: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
      ForEachBaseObject([this](BaseObject* obj) {
                     ^~~~

PR-URL: #35547
Backport-PR-URL: #38786
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
addaleax authored and targos committed May 25, 2021
1 parent 8ffaf59 commit 3e05f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ void Environment::VerifyNoStrongBaseObjects() {

if (!options()->verify_base_objects) return;

ForEachBaseObject([this](BaseObject* obj) {
ForEachBaseObject([](BaseObject* obj) {
if (obj->IsNotIndicativeOfMemoryLeakAtExit()) return;
fprintf(stderr, "Found bad BaseObject during clean exit: %s\n",
obj->MemoryInfoName().c_str());
Expand Down

0 comments on commit 3e05f76

Please sign in to comment.