[MPlayer-cvslog] CVS: main/libmpcodecs dec_audio.c, 1.47, 1.48 dec_audio.h, 1.10, 1.11 dec_video.c, 1.164, 1.165 dec_video.h, 1.15, 1.16 pullup.c, 1.27, 1.28 pullup.h, 1.8, 1.9 vf.c, 1.122, 1.123 vf.h, 1.28, 1.29 vf_pp7.c, 1.6, 1.7 vf_scale.c, 1.61, 1.62 vf_scale.h, 1.1, 1.2 vf_test.c, 1.7, 1.8

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


CVS change done by Dominik Mierzejewski CVS

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

Modified Files:
	dec_audio.c dec_audio.h dec_video.c dec_video.h pullup.c 
	pullup.h vf.c vf.h vf_pp7.c vf_scale.c vf_scale.h vf_test.c 
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: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_audio.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- dec_audio.c	19 Jan 2006 00:08:09 -0000	1.47
+++ dec_audio.c	9 Feb 2006 14:07:55 -0000	1.48
@@ -29,7 +29,7 @@
 int audio_output_channels = 2;
 af_cfg_t af_cfg = {1, NULL}; // Configuration for audio filters
 
-void afm_help(){
+void afm_help(void){
     int i;
     mp_msg(MSGT_DECAUDIO,MSGL_INFO,MSGTR_AvailableAudioFm);
     if (identify)
@@ -434,6 +434,6 @@
   ds_fill_buffer(sh_audio->ds);  // skip block
 }
 
-void adjust_volume()
+void adjust_volume(void)
 {
 }

Index: dec_audio.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_audio.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dec_audio.h	24 Jun 2005 10:50:53 -0000	1.10
+++ dec_audio.h	9 Feb 2006 14:07:55 -0000	1.11
@@ -1,6 +1,6 @@
 
 // dec_audio.c:
-extern void afm_help();
+extern void afm_help(void);
 //extern int init_best_audio_codec(sh_audio_t *sh_audio,char* audio_codec,char* audio_fm);
 extern int init_audio_codec(sh_audio_t *sh_audio);
 extern int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status);

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- dec_video.c	18 Oct 2005 11:11:25 -0000	1.164
+++ dec_video.c	9 Feb 2006 14:07:55 -0000	1.165
@@ -149,7 +149,7 @@
     sh_video->inited=0;
 }
 
-void vfm_help(){
+void vfm_help(void){
     int i;
     mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_AvailableVideoFm);
     if (identify)

Index: dec_video.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- dec_video.h	18 Feb 2004 15:23:41 -0000	1.15
+++ dec_video.h	9 Feb 2006 14:07:55 -0000	1.16
@@ -2,7 +2,7 @@
 // dec_video.c:
 extern int video_read_properties(sh_video_t *sh_video);
 
-extern void vfm_help();
+extern void vfm_help(void);
 
 extern int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list);
 

Index: pullup.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/pullup.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- pullup.c	14 Jun 2005 05:33:34 -0000	1.27
+++ pullup.c	9 Feb 2006 14:07:55 -0000	1.28
@@ -733,7 +733,7 @@
 
 
 
-struct pullup_context *pullup_alloc_context()
+struct pullup_context *pullup_alloc_context(void)
 {
 	struct pullup_context *c;
 

Index: pullup.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/pullup.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pullup.h	14 Jun 2005 05:33:34 -0000	1.8
+++ pullup.h	9 Feb 2006 14:07:55 -0000	1.9
@@ -75,7 +75,7 @@
 void pullup_pack_frame(struct pullup_context *c, struct pullup_frame *fr);
 void pullup_release_frame(struct pullup_frame *fr);
 
-struct pullup_context *pullup_alloc_context();
+struct pullup_context *pullup_alloc_context(void);
 void pullup_preinit_context(struct pullup_context *c);
 void pullup_init_context(struct pullup_context *c);
 void pullup_free_context(struct pullup_context *c);

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- vf.c	22 Jan 2006 18:11:35 -0000	1.122
+++ vf.c	9 Feb 2006 14:07:55 -0000	1.123
@@ -701,7 +701,7 @@
     }
 }
 
-void vf_list_plugins(){
+void vf_list_plugins(void){
     int i=0;
     while(filter_list[i]){
         mp_msg(MSGT_VFILTER,MSGL_INFO,"\t%-10s: %s\n",filter_list[i]->name,filter_list[i]->info);

Index: vf.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- vf.h	11 Sep 2005 06:41:04 -0000	1.28
+++ vf.h	9 Feb 2006 14:07:55 -0000	1.29
@@ -101,7 +101,7 @@
 
 vf_instance_t* append_filters(vf_instance_t* last);
 
-void vf_list_plugins();
+void vf_list_plugins(void);
 
 void vf_uninit_filter(vf_instance_t* vf);
 void vf_uninit_filter_chain(vf_instance_t* vf);

Index: vf_pp7.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_pp7.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_pp7.c	13 Jan 2006 00:23:31 -0000	1.6
+++ vf_pp7.c	9 Feb 2006 14:07:55 -0000	1.7
@@ -212,7 +212,7 @@
 
 static int thres2[99][16];
 
-static void init_thres2(){
+static void init_thres2(void){
     int qp, i;
     int bias= 0; //FIXME
 

Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- vf_scale.c	17 Dec 2005 20:00:16 -0000	1.61
+++ vf_scale.c	9 Feb 2006 14:07:55 -0000	1.62
@@ -492,7 +492,7 @@
 float sws_chr_sharpen= 0.0;
 float sws_lum_sharpen= 0.0;
 
-int get_sws_cpuflags(){
+int get_sws_cpuflags(void){
     return 
           (gCpuCaps.hasMMX   ? SWS_CPU_CAPS_MMX   : 0)
 	| (gCpuCaps.hasMMX2  ? SWS_CPU_CAPS_MMX2  : 0)

Index: vf_scale.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_scale.h	1 Jun 2003 21:59:27 -0000	1.1
+++ vf_scale.h	9 Feb 2006 14:07:55 -0000	1.2
@@ -1,4 +1,4 @@
 //GPL
 
-int get_sws_cpuflags();
+int get_sws_cpuflags(void);
 struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat);

Index: vf_test.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_test.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vf_test.c	13 Jan 2006 00:23:31 -0000	1.7
+++ vf_test.c	9 Feb 2006 14:07:55 -0000	1.8
@@ -64,7 +64,7 @@
 
 static double c[64];
 
-static void initIdct()
+static void initIdct(void)
 {
 	int i;
 




More information about the MPlayer-cvslog mailing list