Skip to content

Commit

Permalink
Avoid a 'may be used uninitialized' warning when built with '-c opt' …
Browse files Browse the repository at this point in the history
…(that could result in a non-null garbage pointer).
  • Loading branch information
bcsgh committed Feb 15, 2024
1 parent 0ce48b3 commit 321d649
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/arena.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 321d649

Please sign in to comment.