Mail Archives: djgpp/2000/06/07/22:10:15
Hello,
I have been casting the malloc to the required pointer type.
But there was a mailing list thread where in it was recomended that
it is better not do that.
I have tried doing that but the compiler gives warnings at the
particular
line. May be i am not doing it exactly right.
Here is the code line and the warning it got from the compiler
strSrc = malloc(100); /* char *strSrc */
main.c:34: warning: assignment makes pointer from integer without a
cast
I am using djgpp with the version of gcc being 2.952, if this makes any
difference.
Is there something wrong with the way i am doing it?
Chaitanya B
- Raw text -