Skip to content

Commit a6654ee

Browse files
committed
Fix compiler warning with protobuf 35.0 (#875)
Signed-off-by: Steve Peters <scpeters@intrinsic.ai> (cherry picked from commit c1a9417)
1 parent ad338ee commit a6654ee

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
@@ -481,7 +481,11 @@ void TestBufferSizeSettings(const std::optional<std::size_t> &_bufferSize,
481481
// Number of ints to get a message size larger than 1MB.
482482
std::size_t numInts = 1000000;
483483
MsgType msg;
484+
#if GOOGLE_PROTOBUF_VERSION >= 7035000
485+
msg.mutable_data()->resize(numInts, 0);
486+
#else
484487
msg.mutable_data()->Resize(numInts, 0);
488+
#endif
485489
// Fill with sequence to avoid compression
486490
std::iota(msg.mutable_data()->begin(), msg.mutable_data()->end(), i);
487491
sentMsgSize += msg.SerializeAsString().size();

0 commit comments

Comments
 (0)