[FFmpeg-devel] [PATCH] Remove useless preprocessor directives.

Michael Niedermayer michaelni
Thu Jun 17 21:02:08 CEST 2010


On Thu, Jun 17, 2010 at 03:32:02PM +0200, Benoit Fouet wrote:
> yuv420_bgr32 and yuva420_bgr32 are only used if HAVE_7REGS is set.
> The other solution would be to add an #else case.
> 
> This fixes the following warnings:
> In file included from libswscale/x86/yuv2rgb_mmx.c:55:
> libswscale/x86/yuv2rgb_template.c: In function ?yuva420_rgb32_MMX?:
> libswscale/x86/yuv2rgb_template.c:410: warning: no return statement in function returning non-void
> libswscale/x86/yuv2rgb_template.c: In function ?yuva420_bgr32_MMX?:
> libswscale/x86/yuv2rgb_template.c:453: warning: no return statement in function returning non-void
> In file included from libswscale/x86/yuv2rgb_mmx.c:62:
> libswscale/x86/yuv2rgb_template.c: In function ?yuva420_rgb32_MMX2?:
> libswscale/x86/yuv2rgb_template.c:410: warning: no return statement in function returning non-void
> libswscale/x86/yuv2rgb_template.c: In function ?yuva420_bgr32_MMX2?:
> libswscale/x86/yuv2rgb_template.c:453: warning: no return statement in function returning non-void
> ---
>  x86/yuv2rgb_template.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)

if this patch works iam ok with it but i think it will break with some
gcc on x86_32

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20100617/b25a2ca5/attachment.pgp>



More information about the ffmpeg-devel mailing list