diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-04-29 20:10:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-04-29 20:10:22 +0100 |
commit | 77327a03904ad7d6f58b07ec698cd15f02a4d6fa (patch) | |
tree | b1f2b0a5e8cf9eb4c71b5809638373e65e461816 /opencl | |
parent | 7739bd5f54606603b9b8199f2cb12c4a1cb86b4f (diff) |
coverity#1358843 Argument cannot be negative
Change-Id: I97911406d55464f042922a2e37b33f92e2c024ef
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/source/opencl_device.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index 907d551b8a69..db143e3dcff1 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -435,7 +435,7 @@ ds_status pickBestDevice(std::unique_ptr<ds_profile>& profile, int& rBestDeviceI 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)."); } |