In C, a void pointer is implicitly convertible to any other pointer type, so all you should need in the function is
If you insist on an explicit type conversion (aka typecast) then the syntax is
double *data = userptr;
/* data[i] can now be accessed for i = 0 to 9 */
If you actually need such a explicit conversion to stop you compiler complaining, then you are actually using a C++ compiler. Note that such an explicit conversion is considered poor form in C.
double *data = (double *)userptr;