Avoid a 'may be used uninitialized' warning when built with '-c opt' (that could result in a non-null garbage pointer).

pull/15846/head
bcsgh 10 months ago
parent 0ce48b30b5
commit 321d649b51
  1. 2
      src/google/protobuf/arena.cc

@ -193,7 +193,7 @@ SizedPtr SerialArena::Free(Deallocator deallocator) {
PROTOBUF_NOINLINE
void* SerialArena::AllocateAlignedFallback(size_t n) {
AllocateNewBlock(n);
void* ret;
void* ret = nullptr;
bool res = MaybeAllocateAligned(n, &ret);
ABSL_DCHECK(res);
return ret;

Loading…
Cancel
Save