[MPlayer-dev-eng] [PATCH] Warning fixes
seru
seru at gmx.net
Sat Dec 21 18:02:37 CET 2002
First of all: what has happened to 'libavcodec' in CVS?
While compiling it says (because it doesn't exist):
make[2]: Leaving directory `/usr/src/MPlayer-CVS/main/libmpeg2'
make: Entering an unknown directory
make: *** libavcodec: No such file or directory. Stop.
make: Leaving an unknown directory
make[2]: Entering directory `/usr/src/MPlayer-CVS/main/libao2'
/* Fix 1 */
I know, jpeglib shouldn't use that macro, but it's a common warning ( http://www.mplayerhq.hu/cgi-bin/htsearch?config=&restrict=&exclude=&method=and&format=builtin-long&sort=score&words=HAVE_STDDEF_H ):
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.622
diff -u -r1.622 configure
--- configure 17 Dec 2002 10:38:48 -0000 1.622
+++ configure 21 Dec 2002 17:22:46 -0000
@@ -4769,8 +4769,11 @@
$_def_dvd_darwin
$_def_sol_scsi_h
$_def_hpux_scsi_h
+/* Jpeglib defined this macro already in /usr/include/jconfig.h which causes a warning */
+/* See http://www.mplayerhq.hu/cgi-bin/htsearch?config=&restrict=&exclude=&method=and&format=builtin-long&sort=score&words=HAVE_STDDEF_H */
+#ifndef HAVE_STDDEF_H
$_def_stddef
-
+#endif
/* Common data directory (for fonts, etc) */
#define DATADIR "$_datadir"
#define CONFDIR "$_confdir"
/* Fix 2 */
af.c:47:63: warning: pasting "name" and ")" does not give a valid preprocessing token
af.c:75:54: warning: pasting ""Could not allocate memory\n"" and ")" does not give a valid preprocessing token
af.c:91:100: warning: pasting "name" and ")" does not give a valid preprocessing token
af.c:97:51: warning: pasting "name" and ")" does not give a valid preprocessing token
af.c:111:73: warning: pasting "name" and ")" does not give a valid preprocessing token
af.c:267:120: warning: pasting "rv" and ")" does not give a valid preprocessing token
af.c:386:156: warning: pasting ""Unable to setup filter system can not meet sound-card demands, please report this error on MPlayer
+development mailing list. \n"" and ")" does not give a valid preprocessing token
af.c:534:122: warning: pasting "len" and ")" does not give a valid preprocessing token
af.c:541:55: warning: pasting ""Could not allocate memory \n"" and ")" does not give a valid preprocessing token
af_mp.c:39:68: warning: pasting "ifmt" and ")" does not give a valid preprocessing token
af_dummy.c:15:167: warning: pasting "bps" and ")" does not give a valid preprocessing token
af_dummy.c:33:74: warning: pasting ""EEEK: Argument af == NULL in af_dummy.c play()."" and ")" does not give a valid preprocessing token
etc. etc. etc.
I don't know if it's even necessary to use the preprocessing token ## in the definition of the macro mp_msg in af.h and af_mp.h, but it doesn't seem to harm, so I'll leave it as it was.
Index: libaf/af_mp.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_mp.h,v
retrieving revision 1.1
diff -u -r1.1 af_mp.h
--- libaf/af_mp.h 12 Nov 2002 12:33:54 -0000 1.1
+++ libaf/af_mp.h 21 Dec 2002 15:51:31 -0000
@@ -18,7 +18,7 @@
#undef af_msg
#endif
#define af_msg(lev, args... ) \
- mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), args ## )
+ mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), ##args )
/* Decodes the format from mplayer format to libaf format */
extern int af_format_decode(int format);
/* Fix 3 */
app.c:195:1: warning: no newline at end of file
Fix attached (fire-warningfix3.patch)
/* Fix 4 */
../loader/qtx/qtxsdk/components.h:157:56: warning: multi-character character constant
../loader/qtx/qtxsdk/components.h:158:56: warning: multi-character character constant
../loader/qtx/qtxsdk/components.h:159:56: warning: multi-character character constant
../loader/qtx/qtxsdk/components.h:160:56: warning: multi-character character constant
../loader/qtx/qtxsdk/components.h:161:56: warning: multi-character character constant
../loader/qtx/qtxsdk/components.h:162:56: warning: multi-character character constant
[...]
Fix attached (fire-warningfix4.patch)
I copy/pasted the way it is done in loader/dshow/libwin32.h
/* Fix 5 */
Commented out some unused variables, renamed `type'
mplayer/mw.c:191: warning: unused variable `type'
mplayer/gtk/fs.c:520: warning: unused variable `FSFrame'
mplayer/gtk/fs.c:521: warning: unused variable `frame2'
mplayer/gtk/fs.c:522: warning: unused variable `frame3'
mplayer/gtk/fs.c:523: warning: unused variable `frame4'
mplayer/gtk/fs.c:527: warning: unused variable `hseparator1'
mplayer/gtk/fs.c:530: warning: unused variable `label1'
mplayer/gtk/fs.c:531: warning: unused variable `hseparator2'
mplayer/gtk/fs.c:532: warning: unused variable `hseparator3'
mplayer/gtk/opts.c:648: warning: unused variable `hbuttonbox2'
mplayer/gtk/opts.c:660: warning: unused variable `Font_group'
mplayer/gtk/opts.c:661: warning: unused variable `CBFontEncoding_items'
/********************/
/* FURTHER WARNINGS */
/********************/
mplayer/gtk/opts.c:960: warning: implicit declaration of function `get_video_quality_max'
must have entered in october in revision 1.26 of the file: http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/Gui/mplayer/gtk/opts.c.diff?r1=1.25&r2=1.26&f=u
Could anyone tell pontscho to have a look at it?
And this one:
mplayer/gtk/eq.c:71: warning: implicit declaration of function `get_video_colors'
must have entered in revision 1.11 of the file: http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/Gui/mplayer/gtk/eq.c.diff?r1=1.10&r2=1.11&f=u
demux_viv.c:308:2: warning: #warning "Calculate PTS from picture header!"
mplayer.c:628: warning: passing arg 2 of `m_config_register_options' from incompatible pointer type
mplayer.c:1268: warning: passing arg 3 of `vf_open_filter' from incompatible pointer type
vobsub.c:87: warning: assignment discards qualifiers from pointer target type
module.c:958: warning: assignment from incompatible pointer type
ext.c:485:2: warning: #warning FIXME
win32.c:831: warning: assignment discards qualifiers from pointer target type
win32.c:1649:2: warning: #warning FIXME
win32.c:2909:2: warning: #warning FIXME!
win32.c:3538: warning: assignment discards qualifiers from pointer target type
win32.c:4192:2: warning: #warning check for _CIpow
DS_Filter.c:161: warning: passing arg 4 of pointer to function from incompatible pointer type
allocator.c:326: warning: assignment from incompatible pointer type
outputpin.c:116: warning: assignment from incompatible pointer type
outputpin.c:117: warning: assignment from incompatible pointer type
outputpin.c:511: warning: assignment from incompatible pointer type
../loader/qtx/qtxsdk/components.h:727: warning: initialization from incompatible pointer type
demux_viv.c:308:2: warning: #warning "Calculate PTS from picture header!"
open.c:540: warning: passing arg 2 of `strtol' from incompatible pointer type
vd_qtvideo.c:219: warning: assignment makes pointer from integer without a cast
vd_qtvideo.c:259: warning: assignment makes pointer from integer without a cast
vd_qtvideo.c:300: warning: passing arg 2 of pointer to function makes integer from pointer without a cast
ve_qtvideo.c:294: warning: assignment from incompatible pointer type
ve_qtvideo.c:295: warning: assignment from incompatible pointer type
ve_qtvideo.c:296: warning: assignment from incompatible pointer type
ve_qtvideo.c:297: warning: assignment from incompatible pointer type
ve_qtvideo.c:298: warning: assignment from incompatible pointer type
ve_qtvideo.c:299: warning: assignment from incompatible pointer type
ve_qtvideo.c:300: warning: assignment from incompatible pointer type
ve_qtvideo.c:301: warning: assignment from incompatible pointer type
ve_qtvideo.c:302: warning: assignment from incompatible pointer type
ve_qtvideo.c:303: warning: assignment from incompatible pointer type
ve_qtvideo.c:304: warning: assignment from incompatible pointer type
ve_qtvideo.c:305: warning: assignment from incompatible pointer type
input.c:1446: warning: passing arg 2 of `m_config_register_options' from incompatible pointer type
dvd_input.c:129: warning: assignment from incompatible pointer type
cfg.c:177: warning: passing arg 2 of `m_config_register_options' from incompatible pointer type
cfg.c:178: warning: implicit declaration of function `m_config_parse_config_file'
cfg.c:242: warning: passing arg 1 of `m_option_print' from incompatible pointer type
bitmap.c:39: warning: passing arg 3 of `png_get_IHDR' from incompatible pointer type
bitmap.c:39: warning: passing arg 4 of `png_get_IHDR' from incompatible pointer type
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.622
diff -u -r1.622 configure
--- configure 17 Dec 2002 10:38:48 -0000 1.622
+++ configure 21 Dec 2002 17:24:05 -0000
@@ -4769,8 +4769,11 @@
$_def_dvd_darwin
$_def_sol_scsi_h
$_def_hpux_scsi_h
+/* Jpeglib defined this macro already in /usr/include/jconfig.h which causes a warning */
+/* See http://www.mplayerhq.hu/cgi-bin/htsearch?config=&restrict=&exclude=&method=and&format=builtin-long&sort=score&words=HAVE_STDDEF_H */
+#ifndef HAVE_STDDEF_H
$_def_stddef
-
+#endif
/* Common data directory (for fonts, etc) */
#define DATADIR "$_datadir"
#define CONFDIR "$_confdir"
-------------- next part --------------
Index: libaf/af_mp.h
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_mp.h,v
retrieving revision 1.1
diff -u -r1.1 af_mp.h
--- libaf/af_mp.h 12 Nov 2002 12:33:54 -0000 1.1
+++ libaf/af_mp.h 21 Dec 2002 16:00:42 -0000
@@ -18,7 +18,7 @@
#undef af_msg
#endif
#define af_msg(lev, args... ) \
- mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), args ## )
+ mp_msg(MSGT_AFILTER,((lev<0)?(lev+3):((lev==0)?MSGL_INFO:(lev+5))), ##args )
/* Decodes the format from mplayer format to libaf format */
extern int af_format_decode(int format);
-------------- next part --------------
Index: Gui/app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.18
diff -u -r1.18 app.c
--- Gui/app.c 29 Nov 2002 00:58:22 -0000 1.18
+++ Gui/app.c 21 Dec 2002 15:55:10 -0000
@@ -192,4 +192,4 @@
for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
if ( appMPlayer.Items[j].msg == event ) appMPlayer.Items[j].pressed=set;
}
-
\ No newline at end of file
+
-------------- next part --------------
Index: loader/qtx/qtxsdk/components.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/qtx/qtxsdk/components.h,v
retrieving revision 1.8
diff -u -r1.8 components.h
--- loader/qtx/qtxsdk/components.h 16 Dec 2002 01:47:42 -0000 1.8
+++ loader/qtx/qtxsdk/components.h 21 Dec 2002 17:25:38 -0000
@@ -17,8 +17,11 @@
typedef signed short SInt16;
typedef unsigned long UInt32;
typedef signed long SInt32;
+#ifndef FOUR_CHAR_CODE
+#define FOUR_CHAR_CODE( ch0, ch1, ch2, ch3 ) \
+((long)(unsigned char)(ch0)|((long)(unsigned char)(ch1)<<8)|((long)(unsigned char)(ch2)<<16)|((long)(unsigned char)(ch3)<< 24))
+#endif // copy/paste from loader/dshow/libwin32.h
-#define FOUR_CHAR_CODE(x) ((unsigned long)(x)) /* otherwise compiler will complain about values with high bit set */
// codec private shit:
typedef void *GlobalsPtr;
@@ -154,22 +157,22 @@
/* values for PixMap.pixelFormat*/
enum {
- k16LE555PixelFormat = FOUR_CHAR_CODE('L555'), /* 16 bit LE rgb 555 (PC)*/
- k16LE5551PixelFormat = FOUR_CHAR_CODE('5551'), /* 16 bit LE rgb 5551*/
- k16BE565PixelFormat = FOUR_CHAR_CODE('B565'), /* 16 bit BE rgb 565*/
- k16LE565PixelFormat = FOUR_CHAR_CODE('L565'), /* 16 bit LE rgb 565*/
- k24BGRPixelFormat = FOUR_CHAR_CODE('24BG'), /* 24 bit bgr */
- k32BGRAPixelFormat = FOUR_CHAR_CODE('BGRA'), /* 32 bit bgra (Matrox)*/
- k32ABGRPixelFormat = FOUR_CHAR_CODE('ABGR'), /* 32 bit abgr */
- k32RGBAPixelFormat = FOUR_CHAR_CODE('RGBA'), /* 32 bit rgba */
- kYUVSPixelFormat = FOUR_CHAR_CODE('yuvs'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
- kYUVUPixelFormat = FOUR_CHAR_CODE('yuvu'), /* YUV 4:2:2 byte ordering 16-signed*/
- kYVU9PixelFormat = FOUR_CHAR_CODE('YVU9'), /* YVU9 Planar 9*/
- kYUV411PixelFormat = FOUR_CHAR_CODE('Y411'), /* YUV 4:1:1 Interleaved 16*/
- kYVYU422PixelFormat = FOUR_CHAR_CODE('YVYU'), /* YVYU 4:2:2 byte ordering 16*/
- kUYVY422PixelFormat = FOUR_CHAR_CODE('UYVY'), /* UYVY 4:2:2 byte ordering 16*/
- kYUV211PixelFormat = FOUR_CHAR_CODE('Y211'), /* YUV 2:1:1 Packed 8*/
- k2vuyPixelFormat = FOUR_CHAR_CODE('2vuy') /* UYVY 4:2:2 byte ordering 16*/
+ k16LE555PixelFormat = FOUR_CHAR_CODE('L','5','5','5'), /* 16 bit LE rgb 555 (PC)*/
+ k16LE5551PixelFormat = FOUR_CHAR_CODE('5','5','5','1'), /* 16 bit LE rgb 5551*/
+ k16BE565PixelFormat = FOUR_CHAR_CODE('B','5','6','5'), /* 16 bit BE rgb 565*/
+ k16LE565PixelFormat = FOUR_CHAR_CODE('L','5','6','5'), /* 16 bit LE rgb 565*/
+ k24BGRPixelFormat = FOUR_CHAR_CODE('2','4','B','G'), /* 24 bit bgr */
+ k32BGRAPixelFormat = FOUR_CHAR_CODE('B','G','R','A'), /* 32 bit bgra (Matrox)*/
+ k32ABGRPixelFormat = FOUR_CHAR_CODE('A','B','G','R'), /* 32 bit abgr */
+ k32RGBAPixelFormat = FOUR_CHAR_CODE('R','G','B','A'), /* 32 bit rgba */
+ kYUVSPixelFormat = FOUR_CHAR_CODE('y','u','v','s'), /* YUV 4:2:2 byte ordering 16-unsigned = 'YUY2'*/
+ kYUVUPixelFormat = FOUR_CHAR_CODE('y','u','v','u'), /* YUV 4:2:2 byte ordering 16-signed*/
+ kYVU9PixelFormat = FOUR_CHAR_CODE('Y','V','U','9'), /* YVU9 Planar 9*/
+ kYUV411PixelFormat = FOUR_CHAR_CODE('Y','4','1','1'), /* YUV 4:1:1 Interleaved 16*/
+ kYVYU422PixelFormat = FOUR_CHAR_CODE('Y','V','Y','U'), /* YVYU 4:2:2 byte ordering 16*/
+ kUYVY422PixelFormat = FOUR_CHAR_CODE('U','Y','V','Y'), /* UYVY 4:2:2 byte ordering 16*/
+ kYUV211PixelFormat = FOUR_CHAR_CODE('Y','2','1','1'), /* YUV 2:1:1 Packed 8*/
+ k2vuyPixelFormat = FOUR_CHAR_CODE('2','v','u','y') /* UYVY 4:2:2 byte ordering 16*/
};
struct __attribute__((__packed__)) PixMapExtension {
-------------- next part --------------
Index: Gui/mplayer/mw.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.c,v
retrieving revision 1.99
diff -u -r1.99 mw.c
--- Gui/mplayer/mw.c 16 Dec 2002 22:25:15 -0000 1.99
+++ Gui/mplayer/mw.c 21 Dec 2002 17:45:32 -0000
@@ -188,7 +188,7 @@
{
wItem * item;
txSample * image = NULL;
- int i, type;
+ int i;
if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
Index: Gui/mplayer/gtk/fs.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.c,v
retrieving revision 1.38
diff -u -r1.38 fs.c
--- Gui/mplayer/gtk/fs.c 27 Nov 2002 22:48:56 -0000 1.38
+++ Gui/mplayer/gtk/fs.c 21 Dec 2002 17:45:34 -0000
@@ -517,19 +517,20 @@
GtkWidget * create_FileSelect( void )
{
- GtkWidget * FSFrame;
+/* GtkWidget * FSFrame;
GtkWidget * frame2;
GtkWidget * frame3;
GtkWidget * frame4;
+ GtkWidget * hseparator1;
+ GtkWidget * hseparator2;
+ GtkWidget * hseparator3;
+ GtkWidget * label1;
+*/
GtkWidget * vbox4;
GtkWidget * hbox4;
GtkWidget * vseparator1;
- GtkWidget * hseparator1;
GtkWidget * hbox6;
GtkWidget * fsFNameListWindow;
- GtkWidget * label1;
- GtkWidget * hseparator2;
- GtkWidget * hseparator3;
GtkWidget * hbuttonbox3;
GtkWidget * uppixmapwid;
Index: Gui/mplayer/gtk/opts.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.c,v
retrieving revision 1.38
diff -u -r1.38 opts.c
--- Gui/mplayer/gtk/opts.c 16 Dec 2002 22:25:17 -0000 1.38
+++ Gui/mplayer/gtk/opts.c 21 Dec 2002 17:45:38 -0000
@@ -645,7 +645,7 @@
GtkWidget * hbox1;
GtkWidget * vbox2;
GtkWidget * scrolledwindow3;
- GtkWidget * hbuttonbox2;
+//GtkWidget * hbuttonbox2;
GtkWidget * vbox3;
GtkWidget * hbox8;
GtkWidget * hbox2;
@@ -657,8 +657,8 @@
GtkWidget * vbox6;
GtkWidget * vbox600;
GSList * OSD_group = NULL;
- GSList * Font_group = NULL;
- GList * CBFontEncoding_items = NULL;
+//GSList * Font_group = NULL;
+//GList * CBFontEncoding_items = NULL;
GtkWidget * vbox7;
GtkWidget * vbox8;
GtkWidget * table1;
More information about the MPlayer-dev-eng
mailing list