[FFmpeg-devel] [PATCH] Fix warning about decode_mb_skip (in libavcodec/h264.h)
Michael Niedermayer
michaelni
Tue Jul 6 15:07:23 CEST 2010
On Tue, Jul 06, 2010 at 01:30:39PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> > On Tue, Jul 06, 2010 at 01:11:30PM +0100, M?ns Rullg?rd wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >>
> >> > 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.
> >>
> >> Templating is all well and good, ...
> >>
> >> > 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
> >>
> >> ... but I don't see any templating being done with this function.
> >
> > there is code specific to interlacing, to b frames to direct spatial mode
> > in there that we had discussed briefly if we should try to template
> > on paff / frame types and so on
> > it also calls fill_decode_caches() which is templated on CABAC/CAVLC already
>
> Fine then. Why didn't just say so instead of trolling about gcc being
> stupid?
because i cant read your mind to know what you know and what you do not know
about the code. that is before you said you dont see templating ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/ba08b6bb/attachment.pgp>
More information about the ffmpeg-devel
mailing list