opencl: Fix wrong implementation of function getNumDeviceWithEmptyScore

gcc report:

opencl_device_selection.h: In function 'ds_status getNumDeviceWithEmptyScore(ds_profile*, unsigned int*)':
opencl_device_selection.h:589:13: warning: value computed is not used [-Wunused-value]
       *num++;
             ^

This is caused by a buggy implementation which increases the value of num
instead of *num.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2016-11-05 20:14:47 +01:00
parent 8972c0e916
commit 90dad1f2ae

View File

@ -586,7 +586,7 @@ static ds_status getNumDeviceWithEmptyScore(ds_profile* profile,
*num=0;
for (i = 0; i < profile->numDevices; i++) {
if (profile->devices[i].score == NULL) {
*num++;
(*num)++;
}
}
return DS_SUCCESS;