SWDEV-306940 - Fix hipamd errors/warnings found by CppCheck
Change-Id: Ia93d4f5262ea4269d8031edbfd27033b887e5300
[ROCm/clr commit: 6e562f4d83]
This commit is contained in:
@@ -340,7 +340,9 @@ hipError_t hipDeviceGetByPCIBusId(int* device, const char*pciBusIdstr) {
|
||||
int pciDeviceID = -1;
|
||||
int pciDomainID = -1;
|
||||
bool found = false;
|
||||
if (sscanf (pciBusIdstr, "%04x:%02x:%02x", &pciDomainID, &pciBusID, &pciDeviceID) == 0x3) {
|
||||
if (sscanf (pciBusIdstr, "%04x:%02x:%02x", reinterpret_cast<unsigned int*>(&pciDomainID),
|
||||
reinterpret_cast<unsigned int*>(&pciBusID),
|
||||
reinterpret_cast<unsigned int*>(&pciDeviceID)) == 0x3) {
|
||||
int count = 0;
|
||||
ihipDeviceGetCount(&count);
|
||||
for (cl_int i = 0; i < count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user