fix -Wsign-compare warnings for some files inside c2 (#18123)
authorHector Yuen <hyz@fb.com>
Tue, 19 Mar 2019 17:30:29 +0000 (10:30 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 19 Mar 2019 17:39:20 +0000 (10:39 -0700)
commit7bb36ada1f2711708b504b08981f9f8b93963595
tree610a4428faffa780d9af1f87c2a898aaf3f4c1a3
parent1c76746f61598cc3c3f05057fd8ebc5e771338fc
fix -Wsign-compare warnings for some files inside c2 (#18123)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18123

the motivation of this fix is to resolve things like:
for(auto i = 0; i < N; i++) where N is bigger than int32

These instances of comparison were found by enabling -Wsign-compare

There are way too many things to fix, so issuing this as a series of fixes

The plan is to fix all these issues and then enable this flag into Caffe2 to catch future instances

Reviewed By: ZolotukhinM

Differential Revision: D14497094

fbshipit-source-id: bca3927a2188bd33a508fa503ba221c220cdaefe
16 files changed:
caffe2/core/blob_serialization.h
caffe2/ideep/utils/ideep_context.h
caffe2/operators/conv_op_impl.h
caffe2/operators/conv_pool_op_base.h
caffe2/operators/ctc_greedy_decoder_op.cc
caffe2/operators/dataset_ops.cc
caffe2/operators/expand_squeeze_dims_op.h
caffe2/operators/experimental/c10/cpu/concat_cpu.cc
caffe2/operators/find_duplicate_elements_op.h
caffe2/operators/onnxifi_op.h
caffe2/operators/reshape_op.h
caffe2/operators/slice_op.h
caffe2/operators/utility_ops.h
caffe2/queue/blobs_queue.cc
caffe2/queue/rebatching_queue.cc
caffe2/transforms/pattern_net_transform.h