From 6a29e9f1390071cdde9bb1d692c61f24463653a8 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Thu, 26 Dec 2024 08:52:28 -0800 Subject: [PATCH] [vm/gardening] Fix unused variable warning due to args evaluation ordering Bug: https://github.com/dart-lang/sdk/issues/59808 Change-Id: Ief330084f7d3782b126d028a34554a01f22db680 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402420 Reviewed-by: Samuel Rawlins Commit-Queue: Alexander Aprelev --- samples/embedder/run_kernel.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/embedder/run_kernel.cc b/samples/embedder/run_kernel.cc index 3686ffc137d1..3b6927a0910f 100644 --- a/samples/embedder/run_kernel.cc +++ b/samples/embedder/run_kernel.cc @@ -104,8 +104,8 @@ int main(int argc, char** argv) { char* error; // Start Dart VM. - CheckError(dart::embedder::InitOnce(&error), error, - "dart::embedder::InitOnce"); + bool result = dart::embedder::InitOnce(&error); + CheckError(result, error, "dart::embedder::InitOnce"); std::vector flags{}; CheckError(Dart_SetVMFlags(flags.size(), flags.data()), "Dart_SetVMFlags");