Skip to content

[C++] Compiler warnings showing in conformance_test_runner #8189

@akjain2052

Description

@akjain2052

What version of protobuf and what language are you using?
Version: v3.14.0
Language: C++

What operating system (Linux, Windows, ...) and version?
Windows/Linux

What runtime / compiler are you using (e.g., python version or gcc version)
gcc

What did you do?
When we run conformance_test_runner. It is showing compiler warnings.

What did you expect to see It should not show any warnings
code/v3.14.0/protobuf$ bazel test :conformance_test_runner
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:conformance_test_runner (20 packages loaded, 995 targets configured).
INFO: Found 1 target and 0 test targets...
Target //:conformance_test_runner up-to-date:
bazel-bin/conformance_test_runner
INFO: Elapsed time: 246.188s, Critical Path: 35.93s
INFO: 309 processes: 19 internal, 290 processwrapper-sandbox.
INFO: Build completed successfully, 309 total actions
INFO: Build completed successfully, 309 total actions

What did you see instead? Showing below warnings
code/v3.14.0/protobuf$ bazel test :conformance_test_runner
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:conformance_test_runner (20 packages loaded, 995 targets configured).
INFO: Found 1 target and 0 test targets...
INFO: From Compiling conformance/conformance_test_runner.cc:
conformance/conformance_test_runner.cc: In member function 'void google::protobuf::ForkPipeRunner::SpawnTestProgram()':
conformance/conformance_test_runner.cc:300:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < executable_args_.size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~
conformance/conformance_test_runner.cc: In member function 'void google::protobuf::ForkPipeRunner::CheckedWrite(int, const void*, size_t)':
conformance/conformance_test_runner.cc:310:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (write(fd, buf, len) != len) {
~~~~~~~~~~~~~~~~~~~~^~~~~~
INFO: From Compiling conformance/binary_json_conformance_suite.cc:
conformance/binary_json_conformance_suite.cc: In function 'std::__cxx11::string {anonymous}::UpperCase(std::__cxx11::string)':
conformance/binary_json_conformance_suite.cc:303:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < str.size(); i++) {
~~^~~~~~~~~~~~
Target //:conformance_test_runner up-to-date:
bazel-bin/conformance_test_runner

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions