[FFmpeg-devel] [PATCH 00/13] check all fclose usage

Ganesh Ajjanagadde gajjanag at mit.edu
Tue Jan 12 16:07:08 CET 2016


On Tue, Jan 12, 2016 at 9:43 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Tue, Jan 12, 2016 at 7:52 AM, Ganesh Ajjanagadde <gajjanag at mit.edu>
> wrote:
>
>> On Tue, Jan 12, 2016 at 4:38 AM, wm4 <nfxjfg at googlemail.com> wrote:
>> > This makes no sense. Even if fclose() should fail for
>> > whatever obscure reasons there might be, reading already worked
>> > without errors, and thus closing failure has no meaning to use.
>>
>> Well, reading may not have worked, and the fclose may have been called
>> in a failure path.
>
>
> Then the error should be in the code path of fread(), not fclose().
> Displaying an error (in whatever way) related to close while the actual
> problem was reading data is going to be confusing to the user.

Read the rest of it; checking for every fread/fseek is not productive;
there are at least 3 of fread/fseek in the example I gave. Printing at
the time of closure is a natural means of doing things, again see:
https://www.gnu.org/ghm/2011/paris/slides/jim-meyering-goodbye-world.pdf
(particularly slide 7).

Again, this is more important for write than read. Or put in other
words: if the approach of checking at close is going to be nacked no
matter what the contents of the message is; I will wash my hands off
this issue wrt files opened read-only.

>
>> Just what is the point?
>>
>> Can you please stop trolling patches with such gratuitous statements at
>> the end?
>
>
> ... Can we not be defensive, please? ...

There was nothing "defensive" here. Can you stop dismissing technical
comments as "defensive"? This is not the first time you are doing
this, and not the first time wm4 has added such useless, provocative
statements...

>
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list