aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <bsteiner@google.com>2018-03-12 11:04:59 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-12 11:10:53 -0700
commit62fa49ff5dbab9df83362112e17c04f857c72f44 (patch)
treed7ae914bbc0c2dc20dfffd02e15622e5335a43ee /tensorflow/cc
parent1d6a57edc0be0dcc0c92eb2610b88420a7b7be51 (diff)
Avoid capturing unused variables in lambda functions
PiperOrigin-RevId: 188747641
Diffstat (limited to 'tensorflow/cc')
-rw-r--r--tensorflow/cc/framework/while_gradients.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/cc/framework/while_gradients.cc b/tensorflow/cc/framework/while_gradients.cc
index 0734075fc6..81870a0efa 100644
--- a/tensorflow/cc/framework/while_gradients.cc
+++ b/tensorflow/cc/framework/while_gradients.cc
@@ -72,9 +72,9 @@ Status AddForwardLoopCounter(WhileContext* while_ctx, const Scope& scope,
};
// Body function that adds one to input.
- BodyGraphBuilderFn body_fn = [while_ctx](const Scope& scope,
- const std::vector<Output>& inputs,
- std::vector<Output>* outputs) {
+ BodyGraphBuilderFn body_fn = [](const Scope& scope,
+ const std::vector<Output>& inputs,
+ std::vector<Output>* outputs) {
DCHECK_EQ(inputs.size(), 1);
outputs->emplace_back(ops::Add(scope, inputs[0], 1));
return scope.status();