Fix pointers mismatches (int * vs size_t *)

Do not pass an int * pointer to functions expecting size_t *. They don't have the same size on all operating systems.