...
Code Block | ||
---|---|---|
| ||
char *p = malloc(10); |
Compliant Solution 2
including Including stdlib.h
ensures the function prototype for malloc()
is declared.
...
Wiki Markup \[[ISO/IEC9899-1999|AA. C References#ISO/IEC 9899-1999]\] Forward \[[MEM02-A|MEM02-A. Do not cast the return value from malloc()]\], \[[MSC00-A|MSC00-A. Compile cleanly at high warning levels]\]