Why do you say it doesn't have a return? What makes you think that? It returns a handle to the allocated memory, or NULL if it fails. You're trying to cast its return to an int and assign that to an int *. You can't assign an int to an int * anywhere, not just this call.