[FFmpeg-devel] [PATCH 07/15] dwt: Fix several warnings about incompatible pointer type

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jul 27 18:43:57 CEST 2012


On Fri, Jul 27, 2012 at 05:23:17AM -0300, jamal wrote:
> ---
>  libavcodec/x86/dwt.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/libavcodec/x86/dwt.c b/libavcodec/x86/dwt.c
> index 1eb8221..7ef9e24 100644
> --- a/libavcodec/x86/dwt.c
> +++ b/libavcodec/x86/dwt.c
> @@ -142,23 +142,23 @@ void ff_spatial_idwt_init_mmx(DWTContext *d, enum dwt_type type)
>  
>      switch (type) {
>      case DWT_DIRAC_DD9_7:
> -        d->vertical_compose_l0 = vertical_compose53iL0_mmx;
> -        d->vertical_compose_h0 = vertical_compose_dd97iH0_mmx;
> +        d->vertical_compose_l0 = (void*)vertical_compose53iL0_mmx;
> +        d->vertical_compose_h0 = (void*)vertical_compose_dd97iH0_mmx;

It matches the architecture-independent dwt.c file, so I guess it is ok.
Though I think it would be better to just use a union here and thus
avoid all the casting (particularly since I believe that even in C
"void *" and function pointers are not necessarily compatible...).


More information about the ffmpeg-devel mailing list