summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-09 14:08:03 +0000
committerrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-09 14:08:03 +0000
commite7db4ccf1afbb6653ae1aae44b1c96c724361985 (patch)
tree9cc7321a75460de67bd0dae4e940b73439a1374b /libmpcodecs
parent1f34ddefd2546a37c6efe4fcd9ea3f7627af4a5d (diff)
downloadmpv-e7db4ccf1afbb6653ae1aae44b1c96c724361985.tar.bz2
mpv-e7db4ccf1afbb6653ae1aae44b1c96c724361985.tar.xz
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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/dec_audio.c4
-rw-r--r--libmpcodecs/dec_audio.h2
-rw-r--r--libmpcodecs/dec_video.c2
-rw-r--r--libmpcodecs/dec_video.h2
-rw-r--r--libmpcodecs/native/xa_gsm.c2
-rw-r--r--libmpcodecs/native/xa_gsm.h2
-rw-r--r--libmpcodecs/pullup.c2
-rw-r--r--libmpcodecs/pullup.h2
-rw-r--r--libmpcodecs/vf.c2
-rw-r--r--libmpcodecs/vf.h2
-rw-r--r--libmpcodecs/vf_pp7.c2
-rw-r--r--libmpcodecs/vf_scale.c2
-rw-r--r--libmpcodecs/vf_scale.h2
-rw-r--r--libmpcodecs/vf_test.c2
14 files changed, 15 insertions, 15 deletions
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c
index 928a2bd9f7..6e391e19f1 100644
--- a/libmpcodecs/dec_audio.c
+++ b/libmpcodecs/dec_audio.c
@@ -29,7 +29,7 @@ int fakemono=0;
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 @@ void skip_audio_frame(sh_audio_t *sh_audio)
ds_fill_buffer(sh_audio->ds); // skip block
}
-void adjust_volume()
+void adjust_volume(void)
{
}
diff --git a/libmpcodecs/dec_audio.h b/libmpcodecs/dec_audio.h
index 2ee8688e52..0891cab55c 100644
--- a/libmpcodecs/dec_audio.h
+++ b/libmpcodecs/dec_audio.h
@@ -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);
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index aae96588f1..7bee9379ab 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -149,7 +149,7 @@ void uninit_video(sh_video_t *sh_video){
sh_video->inited=0;
}
-void vfm_help(){
+void vfm_help(void){
int i;
mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_AvailableVideoFm);
if (identify)
diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h
index 09f955d05c..8b0d513984 100644
--- a/libmpcodecs/dec_video.h
+++ b/libmpcodecs/dec_video.h
@@ -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);
diff --git a/libmpcodecs/native/xa_gsm.c b/libmpcodecs/native/xa_gsm.c
index 4c12d5471d..546edf81dc 100644
--- a/libmpcodecs/native/xa_gsm.c
+++ b/libmpcodecs/native/xa_gsm.c
@@ -40,7 +40,7 @@ static void Gsm_RPE_Decoding();
static XA_GSM_STATE gsm_state;
-void GSM_Init()
+void GSM_Init(void)
{
memset((char *)(&gsm_state), 0, sizeof(XA_GSM_STATE));
gsm_state.nrp = 40;
diff --git a/libmpcodecs/native/xa_gsm.h b/libmpcodecs/native/xa_gsm.h
index 212fbe0e97..232a7761e4 100644
--- a/libmpcodecs/native/xa_gsm.h
+++ b/libmpcodecs/native/xa_gsm.h
@@ -1,6 +1,6 @@
void XA_MSGSM_Decoder(unsigned char *ibuf,unsigned short *obuf);
void XA_GSM_Decoder(unsigned char *ibuf,unsigned short *obuf);
-void GSM_Init();
+void GSM_Init(void);
diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c
index 54466fe222..df4069cc67 100644
--- a/libmpcodecs/pullup.c
+++ b/libmpcodecs/pullup.c
@@ -733,7 +733,7 @@ void pullup_release_frame(struct pullup_frame *fr)
-struct pullup_context *pullup_alloc_context()
+struct pullup_context *pullup_alloc_context(void)
{
struct pullup_context *c;
diff --git a/libmpcodecs/pullup.h b/libmpcodecs/pullup.h
index f6cde2c39a..2f5b119949 100644
--- a/libmpcodecs/pullup.h
+++ b/libmpcodecs/pullup.h
@@ -75,7 +75,7 @@ struct pullup_frame *pullup_get_frame(struct pullup_context *c);
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);
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c
index 6b997cb114..5781dbb0f8 100644
--- a/libmpcodecs/vf.c
+++ b/libmpcodecs/vf.c
@@ -701,7 +701,7 @@ void vf_uninit_filter_chain(vf_instance_t* vf){
}
}
-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);
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
index 4df7cc06af..00a6cf2166 100644
--- a/libmpcodecs/vf.h
+++ b/libmpcodecs/vf.h
@@ -101,7 +101,7 @@ void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* str
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);
diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c
index 395a720487..f0a744325c 100644
--- a/libmpcodecs/vf_pp7.c
+++ b/libmpcodecs/vf_pp7.c
@@ -212,7 +212,7 @@ static const int thres[16]={
static int thres2[99][16];
-static void init_thres2(){
+static void init_thres2(void){
int qp, i;
int bias= 0; //FIXME
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index 5a197fd1be..1bf477310b 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -492,7 +492,7 @@ int sws_chr_hshift= 0;
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)
diff --git a/libmpcodecs/vf_scale.h b/libmpcodecs/vf_scale.h
index 8e863af8bc..5b6db0a06e 100644
--- a/libmpcodecs/vf_scale.h
+++ b/libmpcodecs/vf_scale.h
@@ -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);
diff --git a/libmpcodecs/vf_test.c b/libmpcodecs/vf_test.c
index 8d34412815..ba4ffa1556 100644
--- a/libmpcodecs/vf_test.c
+++ b/libmpcodecs/vf_test.c
@@ -64,7 +64,7 @@ static int config(struct vf_instance_s* vf,
static double c[64];
-static void initIdct()
+static void initIdct(void)
{
int i;