Skip to content

Commit 24989ab

Browse files
authored
[SYCL][NativeCPU] Fix MSVC build. (#17090)
MSVC warns about a possible uninitialized variable. This is a false positive but explicitly initializing always is harmless, so do this.
1 parent 46a6600 commit 24989ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unified-runtime/source/adapters/native_cpu/enqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ ur_result_t withTimingEvent(ur_command_t command_type, ur_queue_handle_t hQueue,
269269
ur_event_handle_t *phEvent,
270270
const std::function<ur_result_t()> &f) {
271271
urEventWait(numEventsInWaitList, phEventWaitList);
272-
ur_event_handle_t event;
272+
ur_event_handle_t event = nullptr;
273273
if (phEvent) {
274274
event = new ur_event_handle_t_(hQueue, command_type);
275275
event->tick_start();

0 commit comments

Comments
 (0)