Skip to content

Commit f5e0ed5

Browse files
authored
[SYCL] Fix uninitialized variables (#11289)
1 parent 834e127 commit f5e0ed5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

enqueue.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier(
371371
UR_ASSERT(!(phEventWaitList != NULL && numEventsInWaitList == 0),
372372
UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST)
373373

374-
ur_result_t Result;
375-
376374
try {
377375
ScopedContext Active(hQueue->getDevice());
378376
uint32_t StreamToken;
@@ -420,9 +418,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier(
420418
hQueue->TransferAppliedBarrier[i] = false;
421419
}
422420
}
423-
if (Result != UR_RESULT_SUCCESS) {
424-
return Result;
425-
}
426421

427422
if (phEvent) {
428423
*phEvent = ur_event_handle_t_::makeNative(
@@ -622,7 +617,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueMemBufferCopy(
622617

623618
try {
624619
ScopedContext Active(hQueue->getDevice());
625-
ur_result_t Result;
620+
ur_result_t Result = UR_RESULT_SUCCESS;
626621
auto Stream = hQueue->getNextTransferStream();
627622

628623
if (phEventWaitList) {

0 commit comments

Comments
 (0)