[MPlayer-cvslog] CVS: main codec-cfg.c, 1.123, 1.124 codec-cfg.h, 1.73, 1.74 cpudetect.c, 1.42, 1.43 divx4_vbr.c, 1.9, 1.10 divx4_vbr.h, 1.1, 1.2 edl.c, 1.5, 1.6 edl.h, 1.7, 1.8 mencoder.c, 1.333, 1.334 mp_msg.c, 1.32, 1.33 mp_msg.h, 1.36, 1.37 mplayer.c, 1.905, 1.906 mplayer.h, 1.30, 1.31 sub_cc.c, 1.4, 1.5 sub_cc.h, 1.3, 1.4

Dominik Mierzejewski CVS syncmail at mplayerhq.hu
Thu Feb 9 15:08:27 CET 2006


CVS change done by Dominik Mierzejewski CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv31671

Modified Files:
	codec-cfg.c codec-cfg.h cpudetect.c divx4_vbr.c divx4_vbr.h 
	edl.c edl.h mencoder.c mp_msg.c mp_msg.h mplayer.c mplayer.h 
	sub_cc.c sub_cc.h 
Log Message:
Patch by Stefan Huehner / stefan % huehner ! org \

patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.

Comments about a similar patch applied to ffmpeg:

That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter

Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- Måns Rullgård



Index: codec-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.c,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- codec-cfg.c	7 Dec 2005 05:12:07 -0000	1.123
+++ codec-cfg.c	9 Feb 2006 14:07:51 -0000	1.124
@@ -747,7 +747,7 @@
 			free(codecs);
 }
 
-void codecs_uninit_free() {
+void codecs_uninit_free(void) {
 	if (video_codecs)
 	codecs_free(video_codecs,nr_vcodecs);
 	video_codecs=NULL;

Index: codec-cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- codec-cfg.h	30 Aug 2005 23:56:21 -0000	1.73
+++ codec-cfg.h	9 Feb 2006 14:07:51 -0000	1.74
@@ -68,6 +68,6 @@
 void select_codec(char* codecname,int audioflag);
 void list_codecs(int audioflag);
 void codecs_reset_selection(int audioflag);
-void codecs_uninit_free();
+void codecs_uninit_free(void);
 
 #endif

Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- cpudetect.c	7 Nov 2005 16:16:14 -0000	1.42
+++ cpudetect.c	9 Feb 2006 14:07:51 -0000	1.43
@@ -45,7 +45,7 @@
 
 #if 1
 // return TRUE if cpuid supported
-static int has_cpuid()
+static int has_cpuid(void)
 {
 	long a, c;
 

Index: divx4_vbr.c
===================================================================
RCS file: /cvsroot/mplayer/main/divx4_vbr.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- divx4_vbr.c	20 Oct 2004 01:32:56 -0000	1.9
+++ divx4_vbr.c	9 Feb 2006 14:07:51 -0000	1.10
@@ -316,17 +316,17 @@
 	return 0;
 }
 
-int VbrControl_get_intra() 
+int VbrControl_get_intra(void) 
 {
 	return m_vFrames[m_iCount].is_key_frame;
 }
 
-short VbrControl_get_drop() 
+short VbrControl_get_drop(void) 
 {
 	return m_bDrop;
 }
 
-int VbrControl_get_quant() 
+int VbrControl_get_quant(void) 
 {
 	return m_iQuant;
 }
@@ -340,7 +340,7 @@
 	if(m_iQuant>max_quantizer) m_iQuant=max_quantizer;
 }
 
-void VbrControl_update_1pass_vbr()
+void VbrControl_update_1pass_vbr(void)
 {
 	VbrControl_set_quant(m_fQuant);
 	m_iCount++;
@@ -395,7 +395,7 @@
 		fprintf(m_pFile, ", new quant %d\n", m_iQuant);
 }
 
-void VbrControl_close()
+void VbrControl_close(void)
 {
 	if(m_pFile)
 	{

Index: divx4_vbr.h
===================================================================
RCS file: /cvsroot/mplayer/main/divx4_vbr.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- divx4_vbr.h	2 Nov 2001 23:58:26 -0000	1.1
+++ divx4_vbr.h	9 Feb 2006 14:07:51 -0000	1.2
@@ -5,13 +5,13 @@
 	int VbrControl_init_2pass_vbr_encoding(const char* filename, int bitrate, double framerate, int crispness, int quality);
 	int VbrControl_init_2pass_vbr_analysis(const char* filename, int quality);
 
-	void VbrControl_update_1pass_vbr();
+	void VbrControl_update_1pass_vbr(void);
 	void VbrControl_update_2pass_vbr_encoding(int motion_bits, int texture_bits, int total_bits);
 	void VbrControl_update_2pass_vbr_analysis(int is_key_frame, int motion_bits, int texture_bits, int total_bits, int quant);
 
-	int VbrControl_get_quant();
+	int VbrControl_get_quant(void);
 	void VbrControl_set_quant(float q);
-	int VbrControl_get_intra();
-	short VbrControl_get_drop();
-	void VbrControl_close();
+	int VbrControl_get_intra(void);
+	short VbrControl_get_drop(void);
+	void VbrControl_close(void);
 

Index: edl.c
===================================================================
RCS file: /cvsroot/mplayer/main/edl.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- edl.c	6 Dec 2005 08:52:17 -0000	1.5
+++ edl.c	9 Feb 2006 14:07:51 -0000	1.6
@@ -54,7 +54,7 @@
  *  \brief Fills EDL operations queue.
  */
 
-edl_record_ptr edl_parse_file()
+edl_record_ptr edl_parse_file(void)
 {
     FILE *fd;
     char line[100];

Index: edl.h
===================================================================
RCS file: /cvsroot/mplayer/main/edl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- edl.h	6 Dec 2005 08:52:18 -0000	1.7
+++ edl.h	9 Feb 2006 14:07:51 -0000	1.8
@@ -24,6 +24,6 @@
 extern char *edl_output_filename; // file to put EDL entries in (-edlout)
 
 void free_edl(edl_record_ptr next_edl_record); // free's entire EDL list.
-edl_record_ptr edl_parse_file(); // fills EDL stack
+edl_record_ptr edl_parse_file(void); // fills EDL stack
 
 #endif

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -r1.333 -r1.334
--- mencoder.c	7 Feb 2006 20:22:43 -0000	1.333
+++ mencoder.c	9 Feb 2006 14:07:51 -0000	1.334
@@ -240,7 +240,7 @@
 
 static char * frameno_filename=NULL;
 
-static void parse_end_at();
+static void parse_end_at(void);
 static char * end_at_string=0;
 //static uint8_t* flip_upside_down(uint8_t* dst, const uint8_t* src, int width, int height);
 
@@ -1571,7 +1571,7 @@
 return interrupted;
 }
 
-static void parse_end_at()
+static void parse_end_at(void)
 {
 
     end_at_type = END_AT_NONE;

Index: mp_msg.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mp_msg.c	20 Jan 2006 20:38:46 -0000	1.32
+++ mp_msg.c	9 Feb 2006 14:07:52 -0000	1.33
@@ -24,7 +24,7 @@
 int mp_msg_level_all = MSGL_STATUS;
 int verbose = 0;
 
-void mp_msg_init(){
+void mp_msg_init(void){
     int i;
     char *env = getenv("MPLAYER_VERBOSE");
     if (env)

Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- mp_msg.h	6 Dec 2005 08:42:47 -0000	1.36
+++ mp_msg.h	9 Feb 2006 14:07:52 -0000	1.37
@@ -94,7 +94,7 @@
 
 #define MSGT_MAX 64
 
-void mp_msg_init();
+void mp_msg_init(void);
 int mp_msg_test(int mod, int lev);
 
 #include "config.h"

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.905
retrieving revision 1.906
diff -u -r1.905 -r1.906
--- mplayer.c	7 Feb 2006 20:22:43 -0000	1.905
+++ mplayer.c	9 Feb 2006 14:07:52 -0000	1.906
@@ -189,7 +189,7 @@
 #include "libmpcodecs/vf.h"
 #include "libmpcodecs/vd.h"
 
-extern void vf_list_plugins();
+extern void vf_list_plugins(void);
 
 //**************************************************************************//
 //**************************************************************************//
@@ -764,7 +764,7 @@
 
 static int play_tree_step = 1;
 
-int sub_source()
+int sub_source(void)
 {
     int source = -1;
     int top = -1;
@@ -807,7 +807,7 @@
 }
 
 // FIXME: if/when the GUI calls this, global sub numbering gets (potentially) broken.
-void update_set_of_subtitles()
+void update_set_of_subtitles(void)
     // subdata was changed, set_of_sub... have to be updated.
 {
     int i;
@@ -1022,7 +1022,7 @@
  * which need to be fixed while watching the movie.
  */
 
-static void log_sub(){
+static void log_sub(void){
     char *fname;
     FILE *f;
     int i;

Index: mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- mplayer.h	7 Apr 2003 16:03:37 -0000	1.30
+++ mplayer.h	9 Feb 2006 14:07:52 -0000	1.31
@@ -59,6 +59,6 @@
 extern int vobsub_id;
 
 extern void exit_player(char* how);
-extern void update_set_of_subtitles();
+extern void update_set_of_subtitles(void);
 
 #endif

Index: sub_cc.c
===================================================================
RCS file: /cvsroot/mplayer/main/sub_cc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sub_cc.c	6 Nov 2002 23:54:21 -0000	1.4
+++ sub_cc.c	9 Feb 2006 14:07:53 -0000	1.5
@@ -67,7 +67,7 @@
 }
 
 
-void subcc_init()
+void subcc_init(void)
 {
 	int i;
 	//printf("subcc_init(): initing...\n");
@@ -107,7 +107,7 @@
 }
 
 
-static void swap_buffers()
+static void swap_buffers(void)
 {
 	subtitle *foo;
 	foo=fb;
@@ -185,7 +185,7 @@
   lastcode=data;  
 }
 
-static void subcc_decode()
+static void subcc_decode(void)
 {
   /* The first number may denote a channel number. I don't have the
    * EIA-708 standard, so it is hard to say.

Index: sub_cc.h
===================================================================
RCS file: /cvsroot/mplayer/main/sub_cc.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sub_cc.h	25 Jul 2002 16:39:21 -0000	1.3
+++ sub_cc.h	9 Feb 2006 14:07:53 -0000	1.4
@@ -3,7 +3,7 @@
 
 extern int subcc_enabled;
 
-void subcc_init();
+void subcc_init(void);
 void subcc_process_data(unsigned char *inputdata,unsigned int len);
 
 #endif /*SUB_CC_H*/




More information about the MPlayer-cvslog mailing list