[FFmpeg-devel] [PATCH] Fix warning about decode_mb_skip (in libavcodec/h264.h)
Michael Niedermayer
michaelni
Tue Jul 6 13:54:14 CEST 2010
On Thu, Jul 01, 2010 at 11:56:32PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> > On Tue, Jun 29, 2010 at 10:06:12PM -0700, Eli Friedman wrote:
> >> Patch attached; fixes warning "'decode_mb_skip' defined but not used".
> >> As far as I can tell, doesn't have any significant effect on the
> >> generated code, since the function in question gets inlined either
> >> way.
> >
> > feel free to add av_unused
>
> I'd rather you did one of the following:
>
> 1. If the intent is to inline the function, mark it inline.
> 2. If not, move it to a .c file of your choosing and make it extern.
> 3. If only used from one .c file, move it there.
The C language contains (non inline) static functions and they are usefull.
Files that use some templating system will sometimes contain functions that
are unused in some configurations.
It is possible that these functions are static.
It is possible that we want these functions to be static, compare the non
templated case. By switching from non templated to templated the reasons
for a function to be static do not suddenly cease to apply.
There is no reason to forbid this combination. Nor is there any reason to
throw hours of time at trying to avoid this combiation, this would be
like forbidding any other arbitrary feature of the language.
also the function might contain a different implementation in different
cases of the template making it non static would then not be practical
without passing its name through a renaming macro.
and av_unused silences the warning, so we do have a clean solution to get
rid of the warning.
Also its not much hassle to once in a while run a scipt that checks if
av_unused marked symbols are used anywhere.
what does that need? 2 grep commands in a loop?
I really dont understand what problem you have with simply adding av_unused
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100706/664bb456/attachment.pgp>
More information about the ffmpeg-devel
mailing list