Skip to content

Fix build warning, ByteSize() is deprecated, use ByteSizeLong() instead#1682

Closed
yangzhg wants to merge 1 commit into
apache:masterfrom
yangzhg:fix_deprecate
Closed

Fix build warning, ByteSize() is deprecated, use ByteSizeLong() instead#1682
yangzhg wants to merge 1 commit into
apache:masterfrom
yangzhg:fix_deprecate

Conversation

@yangzhg
Copy link
Copy Markdown
Member

@yangzhg yangzhg commented Jan 24, 2022

Fix build warning, protobuf ByteSize() is deprecated, use ByteSizeLong() instead

static void SerializeRpcHeaderAndMeta(
butil::IOBuf* out, const RpcMeta& meta, int payload_size) {
const int meta_size = meta.ByteSize();
const int meta_size = meta.ByteSizeLong();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@yangzhg yangzhg closed this Jan 31, 2022
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.

2 participants