[MPlayer-dev-eng] [PATCH] kill a few warnings

Pierre Lombard p_l at gmx.fr
Wed Sep 10 23:43:29 CEST 2003


Hi,

The attached patch kills a few missing C initializer warnings and an
implicit printf() warning.

It compiles here with gcc 3.3.2.

-- 
Best regards,
  Pierre Lombard
-------------- next part --------------
Index: libao2/pl_resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/pl_resample.c,v
retrieving revision 1.13
diff -u -r1.13 pl_resample.c
--- libao2/pl_resample.c	21 Mar 2003 16:42:50 -0000	1.13
+++ libao2/pl_resample.c	10 Sep 2003 22:10:39 -0000
@@ -90,7 +90,15 @@
   int16_t 	xs[CH][L*2]; 	// Circular buffers
 } pl_resample_t;
 
-static pl_resample_t 	pl_resample	= {NULL,NULL,1,1,1,0,W};
+static pl_resample_t 	pl_resample = {
+	.data = NULL,
+	.w = NULL,
+	.dn = 1,
+	.up = 1,
+	.channels = 1,
+ 	.len = 0,
+	.ws = W,
+};
 
 // to set/get/query special features/parameters
 static int control(int cmd,void *arg){
Index: libmpcodecs/ve_divx4.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_divx4.c,v
retrieving revision 1.14
diff -u -r1.14 ve_divx4.c
--- libmpcodecs/ve_divx4.c	13 Aug 2003 16:29:29 -0000	1.14
+++ libmpcodecs/ve_divx4.c	10 Sep 2003 22:10:39 -0000
@@ -482,7 +482,8 @@
     "divx4",
     "A'rpi",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.72
diff -u -r1.72 ve_lavc.c
--- libmpcodecs/ve_lavc.c	1 Sep 2003 14:04:41 -0000	1.72
+++ libmpcodecs/ve_lavc.c	10 Sep 2003 22:10:39 -0000
@@ -848,7 +848,8 @@
     "lavc",
     "A'rpi, Alex, Michael",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_libdv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_libdv.c,v
retrieving revision 1.7
diff -u -r1.7 ve_libdv.c
--- libmpcodecs/ve_libdv.c	19 Jan 2003 01:48:52 -0000	1.7
+++ libmpcodecs/ve_libdv.c	10 Sep 2003 22:10:39 -0000
@@ -110,7 +110,8 @@
     "libdv",
     "A'rpi",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_nuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_nuv.c,v
retrieving revision 1.2
diff -u -r1.2 ve_nuv.c
--- libmpcodecs/ve_nuv.c	4 Mar 2003 13:26:09 -0000	1.2
+++ libmpcodecs/ve_nuv.c	10 Sep 2003 22:10:39 -0000
@@ -224,7 +224,8 @@
   "nuv",
   "Albeu",
   "for internal use by mencoder",
-  vf_open
+  vf_open,
+  NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_qtvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_qtvideo.c,v
retrieving revision 1.7
diff -u -r1.7 ve_qtvideo.c
--- libmpcodecs/ve_qtvideo.c	15 Feb 2003 17:45:10 -0000	1.7
+++ libmpcodecs/ve_qtvideo.c	10 Sep 2003 22:10:39 -0000
@@ -323,7 +323,8 @@
     "qtvideo",
     "Sascha Sommer",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_rawrgb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_rawrgb.c,v
retrieving revision 1.9
diff -u -r1.9 ve_rawrgb.c
--- libmpcodecs/ve_rawrgb.c	19 Jan 2003 01:48:52 -0000	1.9
+++ libmpcodecs/ve_rawrgb.c	10 Sep 2003 22:10:39 -0000
@@ -77,7 +77,8 @@
     "rawrgb",
     "A'rpi",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_vfw.c,v
retrieving revision 1.15
diff -u -r1.15 ve_vfw.c
--- libmpcodecs/ve_vfw.c	13 Aug 2003 16:29:29 -0000	1.15
+++ libmpcodecs/ve_vfw.c	10 Sep 2003 22:10:39 -0000
@@ -284,7 +284,8 @@
     "vfw",
     "A'rpi",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpcodecs/ve_xvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_xvid.c,v
retrieving revision 1.25
diff -u -r1.25 ve_xvid.c
--- libmpcodecs/ve_xvid.c	13 Aug 2003 16:29:29 -0000	1.25
+++ libmpcodecs/ve_xvid.c	10 Sep 2003 22:10:39 -0000
@@ -574,7 +574,8 @@
     "xvid",
     "Kim Minh Kaplan & R?mi Guyomarch",
     "for internal use by mencoder",
-    vf_open
+    vf_open,
+    NULL,
 };
 
 //===========================================================================//
Index: libmpdemux/demux_ty_osd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ty_osd.c,v
retrieving revision 1.2
diff -u -r1.2 demux_ty_osd.c
--- libmpdemux/demux_ty_osd.c	19 Jun 2003 18:20:15 -0000	1.2
+++ libmpdemux/demux_ty_osd.c	10 Sep 2003 22:10:39 -0000
@@ -779,15 +779,15 @@
 #define DST               ( ( TY_XDS[ 3 ][ 4 ][ 0 ] & 0x20 ) >> 5 )
                struct tm tm = 
                {
-                  0,                                 // sec
-                  ( TY_XDS_ptr[ 0 ] & 0x3F ),        // min
-                  ( TY_XDS_ptr[ 1 ] & 0x1F ),        // hour
-                  ( TY_XDS_ptr[ 2 ] & 0x1F ),        // day
-                  ( TY_XDS_ptr[ 3 ] & 0x1f ) - 1,    // month
-                  ( TY_XDS_ptr[ 5 ] & 0x3f ) + 90,   // year
-                  0,                                 // day of week
-                  0,                                 // day of year
-                  0,                                 // DST
+                  .tm_sec = 0,                                // sec
+                  .tm_min = ( TY_XDS_ptr[ 0 ] & 0x3F ),       // min
+                  .tm_hour = ( TY_XDS_ptr[ 1 ] & 0x1F ),      // hour
+                  .tm_mday = ( TY_XDS_ptr[ 2 ] & 0x1F ),      // day
+                  .tm_mon = ( TY_XDS_ptr[ 3 ] & 0x1f ) - 1,   // month
+                  .tm_year = ( TY_XDS_ptr[ 5 ] & 0x3f ) + 90, // year
+                  .tm_wday = 0,                               // day of week
+                  .tm_yday = 0,                               // day of year
+                  .tm_isdst = 0,                              // DST
                };
 
                time_t time_t = mktime( &tm );
Index: postproc/rgb2rgb.h
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb.h,v
retrieving revision 1.28
diff -u -r1.28 rgb2rgb.h
--- postproc/rgb2rgb.h	1 Jun 2003 21:59:01 -0000	1.28
+++ postproc/rgb2rgb.h	10 Sep 2003 22:10:39 -0000
@@ -9,6 +9,8 @@
 #ifndef RGB2RGB_INCLUDED
 #define RGB2RGB_INCLUDED
 
+#include <stdio.h>
+
 /* A full collection of rgb to rgb(bgr) convertors */
 extern void (*rgb24to32)(const uint8_t *src,uint8_t *dst,unsigned src_size);
 extern void (*rgb24to16)(const uint8_t *src,uint8_t *dst,unsigned src_size);


More information about the MPlayer-dev-eng mailing list