summaryrefslogtreecommitdiffstats
path: root/libvo
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 /libvo
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 'libvo')
-rw-r--r--libvo/font_load.h4
-rw-r--r--libvo/font_load_ft.c6
-rw-r--r--libvo/gl_common.c2
-rw-r--r--libvo/gl_common.h2
-rw-r--r--libvo/osd.c2
-rw-r--r--libvo/osd.h2
-rw-r--r--libvo/sub.c6
-rw-r--r--libvo/sub.h4
-rw-r--r--libvo/video_out.c2
-rw-r--r--libvo/video_out.h2
-rw-r--r--libvo/vo_aa.c4
-rw-r--r--libvo/vo_cvidix.c2
-rw-r--r--libvo/vo_gl.c6
-rw-r--r--libvo/vo_gl2.c6
-rw-r--r--libvo/vo_x11.c4
-rw-r--r--libvo/x11_common.c2
-rw-r--r--libvo/x11_common.h4
17 files changed, 30 insertions, 30 deletions
diff --git a/libvo/font_load.h b/libvo/font_load.h
index b2afd64308..b125b9db7b 100644
--- a/libvo/font_load.h
+++ b/libvo/font_load.h
@@ -77,8 +77,8 @@ extern int vo_image_height;
extern int force_load_font;
-int init_freetype();
-int done_freetype();
+int init_freetype(void);
+int done_freetype(void);
font_desc_t* read_font_desc_ft(char* fname,int movie_width, int movie_height);
void free_font_desc(font_desc_t *desc);
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index 81d65bf357..d29ad899a7 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -831,7 +831,7 @@ static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *ch
return i;
}
-static font_desc_t* init_font_desc()
+static font_desc_t* init_font_desc(void)
{
font_desc_t *desc;
int i;
@@ -1089,7 +1089,7 @@ gen_osd:
return desc;
}
-int init_freetype()
+int init_freetype(void)
{
int err;
@@ -1104,7 +1104,7 @@ int init_freetype()
return 0;
}
-int done_freetype()
+int done_freetype(void)
{
int err;
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index f544120f68..0c0c369395 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1144,7 +1144,7 @@ void releaseGlContext(XVisualInfo **vinfo, GLXContext *context) {
*context = 0;
}
-void swapGlBuffers() {
+void swapGlBuffers(void) {
glXSwapBuffers(mDisplay, vo_window);
}
#endif
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index 15dd1f8bfa..926121ac65 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -245,7 +245,7 @@ void releaseGlContext(int *vinfo, HGLRC *context);
int setGlWindow(XVisualInfo **vinfo, GLXContext *context, Window win);
void releaseGlContext(XVisualInfo **vinfo, GLXContext *context);
#endif
-void swapGlBuffers();
+void swapGlBuffers(void);
extern void (APIENTRY *GenBuffers)(GLsizei, GLuint *);
extern void (APIENTRY *DeleteBuffers)(GLsizei, const GLuint *);
diff --git a/libvo/osd.c b/libvo/osd.c
index 6e11a81b90..f73631a161 100644
--- a/libvo/osd.c
+++ b/libvo/osd.c
@@ -258,7 +258,7 @@ static unsigned short fast_osd_15bpp_table[256];
static unsigned short fast_osd_16bpp_table[256];
#endif
-void vo_draw_alpha_init(){
+void vo_draw_alpha_init(void){
#ifdef FAST_OSD_TABLE
int i;
for(i=0;i<256;i++){
diff --git a/libvo/osd.h b/libvo/osd.h
index 80bb457a74..36ff2e68d3 100644
--- a/libvo/osd.h
+++ b/libvo/osd.h
@@ -5,7 +5,7 @@
// Generic alpha renderers for all YUV modes and RGB depths.
// These are "reference implementations", should be optimized later (MMX, etc)
-extern void vo_draw_alpha_init(); // build tables
+extern void vo_draw_alpha_init(void); // build tables
extern void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
extern void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride);
diff --git a/libvo/sub.c b/libvo/sub.c
index 73d4ed28aa..2f2d664998 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -731,7 +731,7 @@ void *vo_vobsub=NULL;
static int draw_alpha_init_flag=0;
-extern void vo_draw_alpha_init();
+extern void vo_draw_alpha_init(void);
mp_osd_obj_t* vo_osd_list=NULL;
@@ -747,7 +747,7 @@ mp_osd_obj_t* new_osd_obj(int type){
return osd;
}
-void free_osd_list(){
+void free_osd_list(void){
mp_osd_obj_t* obj=vo_osd_list;
while(obj){
mp_osd_obj_t* next=obj->next;
@@ -857,7 +857,7 @@ int vo_update_osd(int dxs,int dys){
return chg;
}
-void vo_init_osd(){
+void vo_init_osd(void){
if(!draw_alpha_init_flag){
draw_alpha_init_flag=1;
vo_draw_alpha_init();
diff --git a/libvo/sub.h b/libvo/sub.h
index f82d51d86d..204be88c46 100644
--- a/libvo/sub.h
+++ b/libvo/sub.h
@@ -113,11 +113,11 @@ extern float spu_gaussvar;
extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
extern void vo_remove_text(int dxs,int dys,void (*remove)(int x0,int y0, int w,int h));
-void vo_init_osd();
+void vo_init_osd(void);
int vo_update_osd(int dxs,int dys);
int vo_osd_changed(int new_value);
int vo_osd_check_range_update(int,int,int,int);
-void free_osd_list();
+void free_osd_list(void);
extern int vo_osd_changed_flag;
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 80d61af1b5..8df9bc878a 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -256,7 +256,7 @@ vo_functions_t* video_out_drivers[] =
NULL
};
-void list_video_out(){
+void list_video_out(void){
int i=0;
mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoOutputDrivers);
if (identify)
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 3f6ba5e21a..f042c602d7 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -170,7 +170,7 @@ char *vo_format_name(int format);
int vo_init(void);
vo_functions_t* init_best_video_out(char** vo_list);
-void list_video_out();
+void list_video_out(void);
// NULL terminated array of all drivers
extern vo_functions_t* video_out_drivers[];
diff --git a/libvo/vo_aa.c b/libvo/vo_aa.c
index b75d174eec..4e23247bdf 100644
--- a/libvo/vo_aa.c
+++ b/libvo/vo_aa.c
@@ -191,7 +191,7 @@ osdpercent(int duration, int deko, int min, int max, int val, char * desc, char
}
void
-printosdtext()
+printosdtext(void)
{
if(osd_text_length > 0 && !vo_osd_text) {
memset(c->textbuffer,' ',osd_text_length);
@@ -221,7 +221,7 @@ printosdtext()
}
void
-printosdprogbar(){
+printosdprogbar(void){
/* print mplayer osd-progbar */
if (vo_osd_progbar_type!=-1){
osdpercent(1,1,0,255,vo_osd_progbar_value, __sub_osd_names[vo_osd_progbar_type], "");
diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index fea52ca3ec..18b7b364a8 100644
--- a/libvo/vo_cvidix.c
+++ b/libvo/vo_cvidix.c
@@ -45,7 +45,7 @@ static uint32_t center=0;
static vidix_grkey_t gr_key;
-static uint32_t setup_vidix(){
+static uint32_t setup_vidix(void){
int x=vo_dx,y=vo_dy;
aspect(&vo_dwidth,&vo_dheight,vo_fs ? A_ZOOM : A_NOZOOM);
if(vo_fs || center){
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 9fb7e829a5..e30ab107d3 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -147,7 +147,7 @@ static void texSize(int w, int h, int *texw, int *texh) {
//! maximum size of custom fragment program
#define MAX_CUSTOM_PROG_SIZE (1024 * 1024)
-static void update_yuvconv() {
+static void update_yuvconv(void) {
float bri = eq_bri / 100.0;
float cont = (eq_cont + 100) / 100.0;
float hue = eq_hue / 100.0 * 3.1415927;
@@ -203,7 +203,7 @@ static void update_yuvconv() {
/**
* \brief remove all OSD textures and display-lists, thus clearing it.
*/
-static void clearOSD() {
+static void clearOSD(void) {
int i;
glDeleteTextures(osdtexCnt, osdtex);
#ifndef FAST_OSD
@@ -217,7 +217,7 @@ static void clearOSD() {
/**
* \brief uninitialize OpenGL context, freeing textures, buffers etc.
*/
-static void uninitGl() {
+static void uninitGl(void) {
if (DeletePrograms && fragprog)
DeletePrograms(1, &fragprog);
fragprog = 0;
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 6274cf27e9..6b5396a855 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -100,7 +100,7 @@ struct TexSquare
int dirtyXoff, dirtyYoff, dirtyWidth, dirtyHeight;
};
-static GLint getInternalFormat()
+static GLint getInternalFormat(void)
{
#ifdef GL_WIN32
PIXELFORMATDESCRIPTOR pfd;
@@ -150,7 +150,7 @@ static GLint getInternalFormat()
return GL_RGB;
}
-static int initTextures()
+static int initTextures(void)
{
struct TexSquare *tsq=0;
GLfloat texpercx, texpercy;
@@ -467,7 +467,7 @@ static void gl_set_antialias (int val)
}
-static void drawTextureDisplay ()
+static void drawTextureDisplay (void)
{
struct TexSquare *square = texgrid;
int x, y/*, xoff=0, yoff=0, wd, ht*/;
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 030c6ab9bd..2002582d39 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -148,7 +148,7 @@ extern int sws_flags;
static XVisualInfo vinfo;
-static void getMyXImage()
+static void getMyXImage(void)
{
#ifdef HAVE_SHM
if (mLocalDisplay && XShmQueryExtension(mDisplay))
@@ -238,7 +238,7 @@ static void getMyXImage()
#endif
}
-static void freeMyXImage()
+static void freeMyXImage(void)
{
#ifdef HAVE_SHM
if (Shmem_Flag)
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 97f3ba941f..04a04d2b7e 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -940,7 +940,7 @@ void vo_setwindow(Window w, GC g)
}
#endif
-void vo_x11_uninit()
+void vo_x11_uninit(void)
{
saver_on(mDisplay);
if (vo_window != None)
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index 2c2c4b2d74..e5ea5f1f24 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -48,7 +48,7 @@ extern int vo_x11_check_events(Display *mydisplay);
extern void vo_x11_selectinput_witherr(Display *display, Window w, long event_mask);
extern void vo_x11_fullscreen( void );
extern void vo_x11_setlayer( Display * mDisplay,Window vo_window,int layer );
-extern void vo_x11_uninit();
+extern void vo_x11_uninit(void);
extern Colormap vo_x11_create_colormap(XVisualInfo *vinfo);
extern uint32_t vo_x11_set_equalizer(char *name, int value);
extern uint32_t vo_x11_get_equalizer(char *name, int *value);
@@ -59,7 +59,7 @@ extern Window vo_x11_create_smooth_window( Display *mDisplay, Window mRoot,
extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window,
int img_width, int img_height, int use_fs);
extern void vo_x11_clearwindow( Display *mDisplay, Window vo_window );
-extern void vo_x11_ontop();
+extern void vo_x11_ontop(void);
extern void vo_x11_ewmh_fullscreen( int action );
#endif