You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/01/24 05:50:31 UTC

[GitHub] [incubator-brpc] wwbmmm commented on a change in pull request #1682: Fix build warning, ByteSize() is deprecated, use ByteSizeLong() instead

wwbmmm commented on a change in pull request #1682:
URL: https://github.com/apache/incubator-brpc/pull/1682#discussion_r790430360



##########
File path: src/brpc/policy/baidu_rpc_protocol.cpp
##########
@@ -69,7 +69,7 @@ inline void PackRpcHeader(char* rpc_header, int meta_size, int payload_size) {
 
 static void SerializeRpcHeaderAndMeta(
     butil::IOBuf* out, const RpcMeta& meta, int payload_size) {
-    const int meta_size = meta.ByteSize();
+    const int meta_size = meta.ByteSizeLong();

Review comment:
       Thanks for your contribution!
   ByteSizeLong() is not available in old version protobuf, for compatibility with old version protobuf, you should test protobuf version here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org