diff options
author | Suharsh Sivakumar <suharshs@google.com> | 2017-04-19 13:52:40 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-19 15:03:58 -0700 |
commit | c6ab1fb225d3d44a9d39666991db0f7eb654c018 (patch) | |
tree | 50319e7d4ad883e00085295febe354843792ebf1 /tensorflow/cc/training | |
parent | 1fc916d0c16eab89523b1e031854313ab1ba18e2 (diff) |
Remove all 64/32 bit warnings in tensorflow/cc
Change: 153637886
Diffstat (limited to 'tensorflow/cc/training')
-rw-r--r-- | tensorflow/cc/training/queue_runner.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/cc/training/queue_runner.cc b/tensorflow/cc/training/queue_runner.cc index 324a62e1a9..5aaaa116cf 100644 --- a/tensorflow/cc/training/queue_runner.cc +++ b/tensorflow/cc/training/queue_runner.cc @@ -49,7 +49,12 @@ Status QueueRunner::Init(const QueueRunnerDef& queue_runner_def) { enqueue_op_names_.insert(enqueue_op_names_.end(), queue_runner_def.enqueue_op_name().begin(), queue_runner_def.enqueue_op_name().end()); - runs_ = enqueue_op_names_.size(); + size_t op_names_size = enqueue_op_names_.size(); + if (op_names_size > kint32max) { + return Status(error::INVALID_ARGUMENT, + "Enqueue ops to run cannot exceed kint32max"); + } + runs_ = static_cast<int>(op_names_size); if (runs_ == 0) { return Status(error::INVALID_ARGUMENT, "Empty enqueue ops to run."); } |