Skip to content

Fix sign compare warnings#26131

Open
pps83 wants to merge 3 commits intoprotocolbuffers:mainfrom
pps83:main-sign-compare
Open

Fix sign compare warnings#26131
pps83 wants to merge 3 commits intoprotocolbuffers:mainfrom
pps83:main-sign-compare

Conversation

@pps83
Copy link
Copy Markdown
Contributor

@pps83 pps83 commented Feb 27, 2026

generated_message_tctable_impl.h gets included in user code and results in huge warning output as following:

2>In file included from ..\source\CppClient\client\protobuf/AccountDataEnd.pb.h:21:
2>In file included from C:\work-pps\twsapi-git\ext\protobuf\src\google/protobuf/io/coded_stream.h:111:
2>In file included from C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/absl_check.h:38:
2>In file included from C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h:21:
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(503,43): warning : comparison of integers of different signs: 'const unsigned int' and 'const int' [-Wsign-compare]
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(492,33): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_OP_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/base/optimization.h(190,58): message : expanded from macro 'ABSL_PREDICT_TRUE'
2>C:\work-pps\twsapi-git\ext\protobuf\src\google/protobuf/generated_message_tctable_impl.h(895,7): message : in instantiation of function template specialization 'absl::log_internal::Check_NEImpl<unsigned int, int>' requested here
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/absl_check.h(76,3): message : expanded from macro 'ABSL_DCHECK_NE'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h(76,3): message : expanded from macro 'ABSL_LOG_INTERNAL_DCHECK_NE_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h(51,3): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_NE_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(69,51): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_OP'

`generated_message_tctable_impl.h` gets included in user code and results in huge warning output as following:

```
2>In file included from ..\source\CppClient\client\protobuf/AccountDataEnd.pb.h:21:
2>In file included from C:\work-pps\twsapi-git\ext\protobuf\src\google/protobuf/io/coded_stream.h:111:
2>In file included from C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/absl_check.h:38:
2>In file included from C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h:21:
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(503,43): warning : comparison of integers of different signs: 'const unsigned int' and 'const int' [-Wsign-compare]
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(492,33): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_OP_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/base/optimization.h(190,58): message : expanded from macro 'ABSL_PREDICT_TRUE'
2>C:\work-pps\twsapi-git\ext\protobuf\src\google/protobuf/generated_message_tctable_impl.h(895,7): message : in instantiation of function template specialization 'absl::log_internal::Check_NEImpl<unsigned int, int>' requested here
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/absl_check.h(76,3): message : expanded from macro 'ABSL_DCHECK_NE'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h(76,3): message : expanded from macro 'ABSL_LOG_INTERNAL_DCHECK_NE_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_impl.h(51,3): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_NE_IMPL'
2>C:\work-pps\twsapi-git\ext\abseil-cpp\absl/log/internal/check_op.h(69,51): message : expanded from macro 'ABSL_LOG_INTERNAL_CHECK_OP'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant