diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-11-17 15:37:00 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-17 15:45:18 -0800 |
commit | 54e5000e0b980abe905900599c4493fadae34a15 (patch) | |
tree | c1f0751e5565882a77646589360fe090bec3f3fc /tensorflow/tools/proto_text | |
parent | 8a5610cd9f0b7087c1a7e97071ba1cf9b885315a (diff) |
Merge changes from github.
Change: 139516555
Diffstat (limited to 'tensorflow/tools/proto_text')
-rw-r--r-- | tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc index c31f3c4e81..c5b3ca38ba 100644 --- a/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc +++ b/tensorflow/tools/proto_text/gen_proto_text_functions_lib.cc @@ -154,7 +154,7 @@ class Generator { string GetPackageReferencePrefix(const FileDescriptor* fd) { string result = "::"; const string& package = fd->package(); - for (int i = 0; i < package.size(); ++i) { + for (size_t i = 0; i < package.size(); ++i) { if (package[i] == '.') { result += "::"; } else { @@ -446,6 +446,7 @@ void Generator::AppendParseMessageFunction(const Descriptor& md) { Print("StringPiece identifier;"); Print("if (!scanner->GetResult(nullptr, &identifier)) return false;"); Print("bool parsed_colon = false;"); + Print("(void)parsed_colon;"); // Avoid "set but not used" compiler warning Print("ProtoSpaceAndComments(scanner);"); Print("if (scanner->Peek() == ':') {"); Nest().Print("parsed_colon = true;"); @@ -675,7 +676,7 @@ void Generator::AppendMessageFunctions(const Descriptor& md) { void Generator::AddNamespaceToCurrentSection(const string& package, bool open) { Print(); std::vector<string> parts = {""}; - for (int i = 0; i < package.size(); ++i) { + for (size_t i = 0; i < package.size(); ++i) { if (package[i] == '.') { parts.resize(parts.size() + 1); } else { |