diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index 749d4e77a78dd5..b279a425b81459 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -170,7 +170,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithSamePriority) { runtimeScheduler_->scheduleTask( SchedulerPriority::NormalPriority, std::move(callbackOne)); - uint secondTaskCallOrder; + uint secondTaskCallOrder = 0; auto callbackTwo = createHostFunctionFromLambda( [this, &secondTaskCallOrder](bool /*unused*/) { secondTaskCallOrder = hostFunctionCallCount_; @@ -203,7 +203,7 @@ TEST_P(RuntimeSchedulerTest, scheduleTwoTasksWithDifferentPriorities) { runtimeScheduler_->scheduleTask( SchedulerPriority::LowPriority, std::move(callbackOne)); - uint userBlockingPriorityTaskCallOrder; + uint userBlockingPriorityTaskCallOrder = 0; auto callbackTwo = createHostFunctionFromLambda( [this, &userBlockingPriorityTaskCallOrder](bool /*unused*/) { userBlockingPriorityTaskCallOrder = hostFunctionCallCount_;