protobuf 21.4 not -Wunused-parameter -Werror clean
What version of protobuf and what language are you using? Version:` 21.4 (packaged by homebrew) Language: C++
What operating system (Linux, Windows, ...) and version? macOS 12 (GitHub Actions CI)
What runtime / compiler are you using (e.g., python version or gcc version) macOS 12 clang++
What did you do? Steps to reproduce the behavior:
- Attempt to build mosh (or anything else that uses protobuf and -Werror)
What did you expect to see Successful build
What did you see instead?
In file included from /usr/local/Cellar/protobuf/21.4/include/google/protobuf/io/coded_stream.h:134:
/usr/local/Cellar/protobuf/21.4/include/google/protobuf/port.h:46:41: error: unused parameter 'size' [-Werror,-Wunused-parameter]
inline void SizedDelete(void* p, size_t size) {
^
/usr/local/Cellar/protobuf/21.4/include/google/protobuf/port.h:53:46: error: unused parameter 'size' [-Werror,-Wunused-parameter]
inline void SizedArrayDelete(void* p, size_t size) {
^
In file included from transportfragment.cc:36:
In file included from ./transportfragment.h:40:
In file included from ../protobufs/transportinstruction.pb.h:30:
/usr/local/Cellar/protobuf/21.4/include/google/protobuf/extension_set.h:1264:46: error: unused parameter 'fn' [-Werror,-Wunused-parameter]
LazyEagerVerifyFnType fn) {
^
/usr/local/Cellar/protobuf/21.4/include/google/protobuf/extension_set.h:1330:46: error: unused parameter 'fn' [-Werror,-Wunused-parameter]
LazyEagerVerifyFnType fn) {
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 https://github.com/mobile-shell/mosh/runs/7662589025?check_suite_focus=true has the full logs.
While true, keeping protobuf clean of all warnings in all build configurations is not something we try to do. Simply put, it is too much.
Hi Matt, understood, but would you be willing to accept a PR (internally or externally, whichever you prefer) fixing this particular one?
Internal is easier and yes. We won't spin a new release for it though
Sounds good. I'll look into fixing this tomorrow, and we have no expectations of spinning a new release just for this fix. (Thank you for clarifying nonetheless).
It looks like this was synced out in a8df5b7b3e4307982674dc7ebe33731c0c142962 and released as 21.5.
Hi,
In the latest release 21.12 there are still couple of -Wunused-parameter warnings which were actually fixed in https://github.com/protocolbuffers/protobuf/commit/a8df5b7b3e4307982674dc7ebe33731c0c142962. However it seems these has never made it to the 21.x branch, it was only merged to main branch. Is there any hope to see these fixed in the 21.x branch too (without spinning a new release just for this of course, but something that would be part of any new future 21.x release) ?
if you offer a PR with a cherry-pick to the 21.x branch, we pick it up whenever we make a release. No such release is planned at the moment
Ok, I have just created #11443 11443 then ;)