Skip to content

Commit c1a9417

Browse files
authored
Fix compiler warning with protobuf 35.0 (#875)
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
1 parent 92733c2 commit c1a9417

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

log/test/integration/recorder.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,11 @@ void TestBufferSizeSettings(const std::optional<std::size_t> &_bufferSize,
486486
// Number of ints to get a message size larger than 1MB.
487487
std::size_t numInts = 1000000;
488488
MsgType msg;
489+
#if GOOGLE_PROTOBUF_VERSION >= 7035000
490+
msg.mutable_data()->resize(numInts, 0);
491+
#else
489492
msg.mutable_data()->Resize(numInts, 0);
493+
#endif
490494
// Fill with sequence to avoid compression
491495
std::iota(msg.mutable_data()->begin(), msg.mutable_data()->end(), i);
492496
sentMsgSize += msg.SerializeAsString().size();

0 commit comments

Comments
 (0)