Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Tweak to exception

...

Function

Successful Return

Error Return

putchar()

Character written

EOF

putwchar()

Wide character written

WEOF

puts()

Nonnegative

EOF (negative)

printf(), vprintf()

Number of characters (nonnegative)

Negative

wprintf(), vwprintf()

Number of wide characters (nonnegative)

Negative

kill_dependency()The input parameter NA
memcpy(), wmemcpy()The destination input parameterNA
memmove(), wmemmove()The destination input parameter NA
strcpy(), wcscpy()The destination input parameter NA
strncpy(), wcsncpy()The destination input parameter NA 
strcat(), wcscat()The destination input parameter NA 
strncat(), wcsncat()The destination input parameter NA
memset(), wmemset()The destination input parameterNA 

The return value of a call to fprintf() or one of its variants (vfprintf(), wfprintf() , vwfprintf()) may be ignored if the output is being directed to stdout  or stderr . Otherwise, the return value must be checked.

If a function's return value is to be ignored, it is recommended that the function's return value function's results should be explicitly cast to to void  to to signify the programmer's intent:

Code Block
bgColor#ccccff
langc
int main() {
  (void) printffprintf(stdout, "Hello, world\n"); // printffprintf() return value safely ignored
}

...