Skip to content

Commit 90dad1f

Browse files
committed
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 <[email protected]>
1 parent 8972c0e commit 90dad1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opencl/opencl_device_selection.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ static ds_status getNumDeviceWithEmptyScore(ds_profile* profile,
586586
*num=0;
587587
for (i = 0; i < profile->numDevices; i++) {
588588
if (profile->devices[i].score == NULL) {
589-
*num++;
589+
(*num)++;
590590
}
591591
}
592592
return DS_SUCCESS;

0 commit comments

Comments
 (0)