Skip to content
Commit 71d9e0fe authored by Xi Ruoyao's avatar Xi Ruoyao Committed by Adhemerval Zanella
Browse files

libio: Add __nonnull for FILE * arguments of fclose and freopen

Calling fclose or freopen with a null FILE * is undefined behavior, and
doing so in practice will cause a SIGSEGV.  So it seems suitable for
__nonnull.

This will help the compiler to warn for some buggy code, like
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570

.
Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent bea1a4a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment