Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 430 by [email protected]: c+ warning: unused parameter in
wire_format.h:293
http://code.google.com/p/protobuf/issues/detail?id=430
When generated headers used by project with enabled warning, c++ compiler
complains about unused vars in wire_format.h.
In file included from Proto/cpp/TestPackage.pb.cc:10:
../protobuf/wire_format.h:293: warning: unused parameter ‘data’
../protobuf/wire_format.h:293: warning: unused parameter ‘size’
../protobuf/wire_format.h:293: warning: unused parameter ‘op’
Following patch (attached also) fixes it.
Index: src/google/protobuf/wire_format.h
===================================================================
--- src/google/protobuf/wire_format.h (revision 429)
+++ src/google/protobuf/wire_format.h (working copy)
@@ -294,6 +294,8 @@
WireFormat::Operation op) {
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
WireFormat::VerifyUTF8StringFallback(data, size, op);
+#else
+ (void)data; (void)size; (void)op;
#endif
}
Attachments:
protobuf-wire_format-unused-vars-fix.patch 430 bytes
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.