A previous change improved our use of pointers such that go vet no
longer had an issue with these lines but if we ever need to change the
interaction between rbd and rados like that again we can now rely on a
single call site `cephIoctx` that will return our ceph/c type given the
public Go-language level type from the rados pkg.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The void * is (ab)used in C for passing arbitrary data to the callback,
which in our case is a integer index. However, Go tools can not tell
this is OK and throws an error running go vet. Change the wrapper
function to take a uintptr_t and cast that to void* only in the
(unchecked) C layer.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The DiffIterate call accepts a data structure argument containing the
parameters of the image to "diff" and a callback function. This callback
is called in the C code, making use of the recently added callbacks
helper.
The callback itself is called with the offset and length of the
differing area in the image as well as a data parameter so that
a common function can distinguish or update different data for
different calls if needed (compare to a void* in C).
Signed-off-by: John Mulligan <jmulligan@redhat.com>