Versions Compared

Key

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

...

Code Block
bgColor#ccccff
if (puts("foo") == EOF) {
  /* Handle Error */
}

Exceptions

EXP12-EX1: If a function cannot fail or if the return value is inconsequential or if any errors can be safely ignored, such as for functions called because of their side effects, the function should be explicitly cast to void to signify programmer intent

Code Block
bgColor#ccccff
(void)remove(path);

EXP12-EX2: If a function cannot fail or if the return value cannot signify an error condition, the return value may be ignored. Such functions should be added to a white list when automatic checkers are used.

Code Block
bgColor#ccccff

strcpy(dst, src);

Risk Assessment

...