Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFCCCC
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]\]