Skip to content

Commit

Permalink
Fix compiler warnings issue found in conformance_test_runner#8189
Browse files Browse the repository at this point in the history
Signed-off-by: Abhishek Jain <abhishek.jain3@huawei.com>
  • Loading branch information
akjain2052 authored and Abhishek Jain committed Jan 8, 2021
1 parent 10599e6 commit 3aaffa6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conformance/binary_json_conformance_suite.cc
Expand Up @@ -300,7 +300,7 @@ const FieldDescriptor* GetFieldForOneofType(FieldDescriptor::Type type,
}

string UpperCase(string str) {
for (int i = 0; i < str.size(); i++) {
for (size_t i = 0; i < str.size(); i++) {
str[i] = toupper(str[i]);
}
return str;
Expand Down
4 changes: 2 additions & 2 deletions conformance/conformance_test_runner.cc
Expand Up @@ -297,7 +297,7 @@ void ForkPipeRunner::SpawnTestProgram() {

std::vector<const char *> argv;
argv.push_back(executable.get());
for (int i = 0; i < executable_args_.size(); ++i) {
for (size_t i = 0; i < executable_args_.size(); ++i) {
argv.push_back(executable_args_[i].c_str());
}
argv.push_back(nullptr);
Expand All @@ -307,7 +307,7 @@ void ForkPipeRunner::SpawnTestProgram() {
}

void ForkPipeRunner::CheckedWrite(int fd, const void *buf, size_t len) {
if (write(fd, buf, len) != len) {
if (static_cast<unsigned>(write(fd, buf, len)) != len) {
GOOGLE_LOG(FATAL) << current_test_name_
<< ": error writing to test program: " << strerror(errno);
}
Expand Down

0 comments on commit 3aaffa6

Please sign in to comment.