Skip to content

Commit

Permalink
[Cmd-Buf][L0] Fix Coverity unsigned comparison report
Browse files Browse the repository at this point in the history
Fixes Coverity defect report from L0 command-buffer update
code merged in #1353

```
This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "CommandDesc->newWorkDim >= 0U".
```
  • Loading branch information
EwanC committed Mar 22, 2024
1 parent 4c22f5c commit 48d87ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/adapters/level_zero/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
UR_ASSERT(Command, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
UR_ASSERT(CommandDesc, UR_RESULT_ERROR_INVALID_NULL_POINTER);
UR_ASSERT(CommandDesc->newWorkDim >= 0 && CommandDesc->newWorkDim <= 3,
UR_ASSERT(CommandDesc->newWorkDim <= 3,
UR_RESULT_ERROR_INVALID_WORK_DIMENSION);

// Lock command, kernel and command buffer for update.
Expand Down

0 comments on commit 48d87ff

Please sign in to comment.