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 20, 2024
1 parent ed1f8bf commit f47b0a9
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 f47b0a9

Please sign in to comment.