Hi Duy, On Wed, 3 May 2017, Nguyễn Thái Ngọc Duy wrote: > The main thing to catch here is when fopen() is called on a > directory. It's safe even without this change because a few lines > earlier we do check if "filename" is a regular file. > > Regardless, let's stay on the safe side in case somebody changes those > lines. Unconditionally printing to stderr by warn_on_inaccessible() > should be fine, because the caller does unconditional fprintf(stderr, > too, no checking for quiet option or anything. > > Signed-off-by: Nguyễn Thái Ngọc Duy I appreciate that you mention specifically the use case that triggered my complaint that in turn prodded you into starting working on this. However, I think this should be a mere side note in a single commit that introduces and uses fopen_or_warn(). Ciao, Dscho