[MPlayer-dev-eng] Four small patches addressing build problems (fwd)

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Tue Dec 13 22:17:46 CET 2005


On Wednesday, 07 December 2005 at 09:42, Peter Breitenlohner wrote:

> 	Avoid gcc warnings:
> 		'...' might be used uninitialized in this function
> 
> 	I think, in this case 'H', 'N', 'D', and 'F' can indeed be
> 	used unitialized, thus possibly causing all sorts of problems.
> 
> diff -ur MPlayer-1.0pre7try2.orig/Gui/mplayer/gtk/menu.c MPlayer-1.0pre7try2/Gui/mplayer/gtk/menu.c
> --- MPlayer-1.0pre7try2.orig/Gui/mplayer/gtk/menu.c	2005-01-25 13:44:38.000000000 +0100
> +++ MPlayer-1.0pre7try2/Gui/mplayer/gtk/menu.c	2005-12-04 23:29:32.000000000 +0100
> @@ -594,14 +594,13 @@
>      N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize"      ",b1,evNormalSize );
>      D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
>      F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen );
> -   }
> -
> -  if ( !gtkShowVideoWindow && !guiIntfStruct.Playing )
> -   {
> -    gtk_widget_set_sensitive( H,FALSE );
> -    gtk_widget_set_sensitive( N,FALSE );
> -    gtk_widget_set_sensitive( D,FALSE );
> -    gtk_widget_set_sensitive( F,FALSE );
> +    if ( !gtkShowVideoWindow && !guiIntfStruct.Playing )
> +     {
> +      gtk_widget_set_sensitive( H,FALSE );
> +      gtk_widget_set_sensitive( N,FALSE );
> +      gtk_widget_set_sensitive( D,FALSE );
> +      gtk_widget_set_sensitive( F,FALSE );
> +     }
>     }
>  
>    AddSeparator( Menu );

Resend without cosmetics (whitespace changes). What does it actually do,
remove one parenthesis?

> 	Avoid gcc warnings:
> 		"..." redefined
> 		this is the location of the previous definition
> 
> diff -ur MPlayer-1.0pre7try2.orig/libmpdemux/muxer_mpeg.c MPlayer-1.0pre7try2/libmpdemux/muxer_mpeg.c
> --- MPlayer-1.0pre7try2.orig/libmpdemux/muxer_mpeg.c	2005-04-10 12:06:59.000000000 +0200
> +++ MPlayer-1.0pre7try2/libmpdemux/muxer_mpeg.c	2005-12-04 23:00:44.000000000 +0100
> @@ -993,8 +993,12 @@
>  }
>  
>  
> +#ifndef max
>  #define max(a, b) ((a) >= (b) ? (a) : (b))
> +#endif
> +#ifndef min
>  #define min(a, b) ((a) <= (b) ? (a) : (b))
> +#endif

This should be fixed differently (some common #define in a common header).
Then, all surplus #defines should be removed and checked if they use the
same sematics.

>  static uint32_t get_audio_frame_size(muxer_headers_t *spriv, uint8_t *buf, int format, int samples_ps)
> diff -ur MPlayer-1.0pre7try2.orig/libvo/vo_jpeg.c MPlayer-1.0pre7try2/libvo/vo_jpeg.c
> --- MPlayer-1.0pre7try2.orig/libvo/vo_jpeg.c	2005-02-28 01:26:53.000000000 +0100
> +++ MPlayer-1.0pre7try2/libvo/vo_jpeg.c	2005-12-04 23:05:46.000000000 +0100
> @@ -32,6 +32,7 @@
>  
>  /* Local Includes */
>  
> +#undef HAVE_STDDEF_H		/* already defined (differently) in jpeglib.h */
>  #include "config.h"
>  #include "subopt-helper.h"
>  #include "mp_msg.h"

This is due to broken libjpeg. We don't work around others' bugs.

R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"




More information about the MPlayer-dev-eng mailing list