Remove unused variables.
Silence the unused variable warning by void cast.
Comment unused labels.
Avoid signed unsigned comparison.

Change the type of ReplThreshold from size_t to int.
Add parenthesis to bitwise and operator.
Move workgroup_variables to same preprocessing scope.
Discard unused return value: num_properties.
Add missing -lpthread to libpocl_la_LIBADD.
Check the return value of clEnqueueReadBuffer.
Cast the userdata properly to avoid format string warning.
Fix uninitialized variables num_channels, elem_size.