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:Adhemerval Zanella <adhemerval.zanella@linaro.org>
Loading
Please register or sign in to comment