This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
warning: incompatible implicit declaration of built-in function 'malloc'
- From: Robert Dell <dellr at mac dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 27 Jan 2011 00:43:48 -0500
- Subject: warning: incompatible implicit declaration of built-in function 'malloc'
can somebody please explain why I'm getting this warning?
warning: incompatible implicit declaration of built-in function 'malloc'
char *returnval = 0;
long outputBytes = 0;
... outputBytes gets changed and tested to ensure it's valid (non zero) ...
the offending line is here.
returnval = (char *) malloc(outputBytes + 2);