[vm] RISC-V fix build

Prevent build error with `gcc-riscv64-linux-gnu (4:12.2.0-4)`.

TEST=build on RISC-V bot + tested locally.

Change-Id: If349cccc49ed5ce9c76da8fdd1c48704cb57d9de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286820
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Daco Harkes 2023-03-03 14:07:47 +00:00 committed by Commit Queue
parent 2a746cb51f
commit 8b33eb6114

View file

@ -489,7 +489,7 @@ void IsolateGroup::CreateHeap(bool is_vm_isolate,
}
void IsolateGroup::Shutdown() {
char* name;
char* name = nullptr;
// We retrieve the flag value once to avoid the compiler complaining about the
// possibly uninitialized value of name, as the compiler is unaware that when
// the flag variable is non-const, it is set once during VM initialization and