R
Richard Heathfield
Martin Jørgensen said:
The correct way to get rid of the warning is to include a header that gives
the prototype of the alloc_mem function.
Michael said:Martin said:int *int_array = (int *) alloc_mem( N, sizeof(int_array[0]), __FILE__,
__LINE__, &total_mem);
Why are you casting? void* can be converted to int* implicitly.
Same argument as for malloc() itself.
Hmmm. I don't know. Hopefully it's because I got a compiler warning and
then wanted to get rid of it... Can't exactly remember if there was any
reason at all...
The correct way to get rid of the warning is to include a header that gives
the prototype of the alloc_mem function.