Operating System - HP-UX
1827838 Members
1455 Online
109969 Solutions
New Discussion

Re: multiple versions of malloc()

 
Banibrata Dutta
Frequent Advisor

multiple versions of malloc()

hi,

it seems that there are multiple versions of malloc(). one version seems to be visible if i include stdio.h, one thru stdlib.h and one thru malloc.h

if i build for 64bit arch using the ansi-C compiler the same code, but with different
header files included (i.e. either one of stdio.h, stdlib.h and malloc.h), i get a warning in one case. incase i've included stdlib.h the compiler generates the following warning in the line with malloc().

warning 724: Cast converts default int return type to pointer.

how is this possible ? what's the work around ?

thanks,
bd
1 REPLY 1
ranganath ramachandra
Esteemed Contributor

Re: multiple versions of malloc()

what compile options are you using ? none of the header files you mention seems to make a difference with cc - i see no warnings or errors except for the warning you mention when none of the headers is included.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo