[FFmpeg-devel] [FFmpeg-cvslog] vf_yadif: silence a warning.

James Darnley james.darnley at gmail.com
Fri Feb 15 18:07:49 CET 2013

On 2013-02-14 14:32, Nicolas George wrote:
> Le sextidi 26 pluviôse, an CCXXI, James Darnley a écrit :
>> Is it ugly enough that you would be willing to commit a revert?  Or are
>> these changes wanted because the existing line (quoted below) wasn't
>> enough to make that compiler be quiet.
>>> yadif->filter_line = (void*)filter_line_c_16bit;
> I am not sure whether this can be the problem, but I notice that in strict
> conformance with the C standard, (void *) is not a valid cast for a function
> pointer. Casting filter_line_c_16bit to the exact type of filter_line may be
> better.

I can't comment on whether that is right however, an exact cast makes
the line:
> yadif->filter_line = (void (*)(uint8_t*, uint8_t*, uint8_t*, uint8_t*, int, int, int, int, int))filter_line_c_16bit;

This could be avoided with a typedef but I'm beginning to think that all
this hassle isn't worth it.  The existing code silences the warning.
The alternatives do not appear to be any prettier.

I think I'll drop the issue if nobody has any more comments.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130215/012ba1ea/attachment.asc>

More information about the ffmpeg-devel mailing list