- Notifications
You must be signed in to change notification settings - Fork 16k
Description
What version of protobuf and what language are you using?
Version: master
Language: C++
What operating system (Linux, Windows, ...) and version? Linux, any will do
What runtime / compiler are you using (e.g., python version or gcc version)
clang or gcc, with -Wunused-parameter switch enabled
What did you do?
Steps to reproduce the behavior:
- Use map<string, string> field in a message
- Use syntax="proto2"; (default behavior)
- Don't use optimize_for="lite_runtime"; (default behavior)
- Get
error: unused parameter 'p' [-Werror,-Wunused-parameter] static void Check(ConstPtr p) { in utf8 key / value validation.
Anything else we should know about your project / environment
The issue is triggered by incorrect check. At the time key / value validation method is invoked if either key or value is string.
However, the Utf8CheckMode must be taken into account and check generation / invokation should be omitted.
The fix will result in a number of pull requests. I am goind to attach them all to this issue.