Skip to content

Commit 2d7bea4

Browse files
committed
[Cmd-Buf][L0] Fix Coverity unsigned comparison report
Fixes Coverity defect report from L0 command-buffer update code merged in oneapi-src#1353 ``` This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "CommandDesc->newWorkDim >= 0U". ```
1 parent c98fdbc commit 2d7bea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/adapters/level_zero/command_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
10301030
UR_ASSERT(Command, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
10311031
UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
10321032
UR_ASSERT(CommandDesc, UR_RESULT_ERROR_INVALID_NULL_POINTER);
1033-
UR_ASSERT(CommandDesc->newWorkDim >= 0 && CommandDesc->newWorkDim <= 3,
1033+
UR_ASSERT(CommandDesc->newWorkDim <= 3,
10341034
UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
10351035

10361036
// Lock command, kernel and command buffer for update.

0 commit comments

Comments
 (0)