[vlc-devel] [Patch] Removed unused parameter
Hugo Beauzee-Luyssen
beauze.h at gmail.com
Tue Aug 25 20:43:14 CEST 2009
2009/8/25 Rémi Denis-Courmont <remi at remlab.net>:
> Le jeudi 20 août 2009 19:08:17 Hugo Beauzee-Luyssen, vous avez écrit :
>> > I removed every static functions unused parameters, however, in
>> > http.c, there's an unused parameter that i set as unused, since it
>> > looks like this prototype is need in some other libraries, and I don't
>> > want to screw it up ;)
>> >
>> > Regards,
>>
>> Here comes a new version that prevent a screw up, notified by j-b.
>
> As a matter of principles, I have a problem with removing the size parameter
> of a function that parses an array of bytes.
>
> It seems like you're trying to hide a bug.
>
To both of you: this was a quick fix to help vlc build after
-Werror=unused-parameter has been add to the build process. I don't
really remember every detail of it. However :
To Pierre: because the parameter was flag as unused by gcc, and for a
reason that felt probably very good at this time, I felt like naming
this parameter unused since it was. Obviously this doesn't change
anything to the build, so it's really up to you to keep it that way or
not.
To Rémi: Since the parameter was marked as unused by the compiler, and
wasn't used in any sort of callback system (if it was, then it's my
mistake and obviously, we should keep the prototype as it is, but
since gcc didn't complain, I guess it was not), I don't see what bug
it could hide. Flagging it with VLC_UNUSED would have been hiding
something, that I agree, but since the parameter is unused.... well
it's not used... and removing it shouldn't cause any problem, or at
least none than I can think of, but again, I may be mistaking.
Regards,
--
Hugo Beauzée-Luyssen
More information about the vlc-devel
mailing list