-
Couldn't load subscription status.
- Fork 39
Open
Description
Lines 1161 to 1170 in e8da229
| enum oroApi | |
| { | |
| ORO_API_AUTOMATIC = 1<<0, | |
| ORO_API_HIPDRIVER = 1 << 1, | |
| ORO_API_HIPRTC = 1 << 2, | |
| ORO_API_HIP = ORO_API_HIPDRIVER | ORO_API_HIPRTC, | |
| ORO_API_CUDADRIVER = 1 << 3, | |
| ORO_API_CUDARTC = 1 << 4, | |
| ORO_API_CUDA = ORO_API_CUDADRIVER | ORO_API_CUDARTC, | |
| }; |
The union (i.e., bitwise OR operation) of
oroApi elements is not an element of oroApi. But the current API deign forces us to cast the union to oroApi, such as oroInitialize(static_cast<oroApi>(ORO_API_HIP | ORO_API_CUDA,.Line 1257 in e8da229
| int oroInitialize( oroApi api, oroU32 flags, |
For this case, the Clang analyzer can detect the out of range for
oroApi and warns. To avoid such out of range, it may be better to change the function parameter type from oroApi to uint32_t.Metadata
Metadata
Assignees
Labels
No labels