Re: warning: assignment makes pointer from integer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Manal Helal" <manalorama@xxxxxxxxx> writes:

> I am doing a realloc as follows:
> 
> structArray[i].innerarray = realloc (structArray[i].innerarray,
> structArray[i].innerarraySize * sizeof *(structArray[i].innerarray));
> 
> where I am changing the size of the inner array (defined as (int *)in
> the structure array, to the new size structArray[i].innerarraySize,
> and it is giving me:
> 
> warning: assignment makes pointer from integer without a cast

Did you #include <stdlib.h>?  When you use -Wall, do you see a warning
about calling realloc with no declaration?

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux