coverity#1358843 Argument cannot be negative
Change-Id: I97911406d55464f042922a2e37b33f92e2c024ef
This commit is contained in:
@@ -435,7 +435,7 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI
|
|||||||
rBestDeviceIndex = d;
|
rBestDeviceIndex = d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (profile->devices[rBestDeviceIndex].eType == DeviceType::OpenCLDevice)
|
if (rBestDeviceIndex != -1 && profile->devices[rBestDeviceIndex].eType == DeviceType::OpenCLDevice)
|
||||||
{
|
{
|
||||||
SAL_INFO("opencl.device", "Selected Device[" << rBestDeviceIndex << "]: " << profile->devices[rBestDeviceIndex].sDeviceName << "(OpenCL).");
|
SAL_INFO("opencl.device", "Selected Device[" << rBestDeviceIndex << "]: " << profile->devices[rBestDeviceIndex].sDeviceName << "(OpenCL).");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user