[FFmpeg-devel] [PATCH 1/3] avcodec/cfhd: remove unused function
Reimar.Doeffinger at gmx.de
Thu Jun 27 23:25:17 EEST 2019
On 27.06.2019, at 17:35, Vittorio Giovara <vittorio.giovara at gmail.com> wrote:
> On Thu, Jun 27, 2019 at 9:44 AM Nicolas George <george at nsup.org> wrote:
>> Kieran Kunhya (12019-06-27):
>>> I'm happy to do it now that I am aware of the issue. I will do it when I
>>> at home in a few days.
>> Thanks. I am sure Steven will not mind waiting a few days.
>>> This absolutism is absurd.
>> Do you have an example of situation where dead code is good?
> If i could add my 2 cents, for a reverse engineered codec it's important to
> leave unused functions purely for documentation purposes, so that future
> maintainers could implement and read about it right away, rather than
> digging in a large and messy git history.
> Additionally most compilers run passes that drop dead code already in a way
> that does not affect runtime one bit. So I really don't see any gains in
> removing these 14 lines of code.
I'd note that intentionally dead code should at least have a comment, and
maybe even a #if 0 would make sense (though has the disadvantage of not
even compile-testing the code).
In case of an actual bug like here I would say dead code if nothing else is a reminder of the
bug, though admittedly a very poor one.
Either way I suggest to discuss such things more relaxed, a few days more or
less hardly matters and there might be useful insights from other people (of
course I don't mean to delay non-controversial stuff nobody has any comments/objections on).
More information about the ffmpeg-devel