[MPlayer-cvslog] CVS: main/libmpdemux cookies.c, 1.5, 1.6 cue_read.c, 1.12, 1.13 demux_ogg.c, 1.86, 1.87 demux_ty_osd.c, 1.5, 1.6 dvbin.c, 1.16, 1.17 dvbin.h, 1.10, 1.11 http.c, 1.33, 1.34 http.h, 1.6, 1.7 network.c, 1.121, 1.122 network.h, 1.20, 1.21 tvi_def.h, 1.8, 1.9 yuv4mpeg.c, 1.2, 1.3

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


CVS change done by Dominik Mierzejewski CVS

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

Modified Files:
	cookies.c cue_read.c demux_ogg.c demux_ty_osd.c dvbin.c 
	dvbin.h http.c http.h network.c network.h tvi_def.h yuv4mpeg.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: cookies.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cookies.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- cookies.c	13 Nov 2005 20:25:06 -0000	1.5
+++ cookies.c	9 Feb 2006 14:07:56 -0000	1.6
@@ -159,7 +159,7 @@
 }
 
 /* Attempt to load cookies.txt from various locations. Returns a pointer to the linked list contain the cookies. */
-static struct cookie_list_type *load_cookies()
+static struct cookie_list_type *load_cookies(void)
 {
     DIR *dir;
     struct dirent *ent;

Index: cue_read.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cue_read.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cue_read.c	18 Nov 2005 14:39:18 -0000	1.12
+++ cue_read.c	9 Feb 2006 14:07:56 -0000	1.13
@@ -268,7 +268,7 @@
  return frame + (second + minute * 60 ) * 75;
 }
 
-static inline int cue_get_msf() {
+static inline int cue_get_msf(void) {
   return cue_msf_2_sector (cue_current_pos.minute,
                            cue_current_pos.second,
                            cue_current_pos.frame);
@@ -433,7 +433,7 @@
 
 
 
-static int cue_read_toc_entry() {
+static int cue_read_toc_entry(void) {
 
   int track = cue_current_pos.track - 1;
 
@@ -480,7 +480,7 @@
   return VCD_SECTOR_DATA * cue_get_msf();
 }
 
-static void cue_vcd_read_toc(){
+static void cue_vcd_read_toc(void){
   int i;
   for (i = 0; i < nTracks; ++i) {
 

Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- demux_ogg.c	18 Dec 2005 11:55:47 -0000	1.86
+++ demux_ogg.c	9 Feb 2006 14:07:56 -0000	1.87
@@ -221,7 +221,7 @@
   return (ret);
 }
 
-void demux_ogg_init_sub () {
+void demux_ogg_init_sub (void) {
   int lcv;
   if(!ogg_sub.text[0]) // not yet allocated
   for (lcv = 0; lcv < SUB_MAX_TEXT; lcv++) {

Index: demux_ty_osd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ty_osd.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- demux_ty_osd.c	18 Nov 2005 14:39:19 -0000	1.5
+++ demux_ty_osd.c	9 Feb 2006 14:07:56 -0000	1.6
@@ -63,7 +63,7 @@
 static int             tyOSDInited = 0;
 static int             tyOSDUpdate = 0;
 
-static void ty_DrawOSD()
+static void ty_DrawOSD(void)
 {
 	// printf( "Calling ty_DrawOSD()\n" );
 	tyOSDUpdate = 1;
@@ -161,7 +161,7 @@
    *( TY_CC_ptr++ ) = ( c == 14 ) ? '/' : c; // swap a '/' for musical note
 }
 
-static void ty_draw()
+static void ty_draw(void)
 {
    if ( TY_CC_ptr != TY_CC_buf && TY_OSD_flags & TY_TEXT_MODE ) 
    {
@@ -513,7 +513,7 @@
 }
 
 
-static void ty_DisplayXDSInfo()
+static void ty_DisplayXDSInfo(void)
 {
    int index;
    int size;

Index: dvbin.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/dvbin.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dvbin.c	18 Nov 2005 14:39:19 -0000	1.16
+++ dvbin.c	9 Feb 2006 14:07:56 -0000	1.17
@@ -767,7 +767,7 @@
 }
 
 #define MAX_CARDS 4
-dvb_config_t *dvb_get_config()
+dvb_config_t *dvb_get_config(void)
 {
 	int i, fd, type, size;
 	char filename[30], *conf_file, *name;

Index: dvbin.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/dvbin.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- dvbin.h	16 Apr 2005 12:51:09 -0000	1.10
+++ dvbin.h	9 Feb 2006 14:07:57 -0000	1.11
@@ -109,6 +109,6 @@
 
 extern int dvb_step_channel(dvb_priv_t *, int);
 extern int dvb_set_channel(dvb_priv_t *, int, int);
-extern dvb_config_t *dvb_get_config();
+extern dvb_config_t *dvb_get_config(void);
 
 #endif

Index: http.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/http.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- http.c	8 Nov 2005 22:07:53 -0000	1.33
+++ http.c	9 Feb 2006 14:07:57 -0000	1.34
@@ -279,7 +279,7 @@
 }
 
 HTTP_header_t *
-http_new_header() {
+http_new_header(void) {
 	HTTP_header_t *http_hdr;
 
 	http_hdr = (HTTP_header_t*)malloc(sizeof(HTTP_header_t));

Index: http.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/http.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- http.h	29 Oct 2002 09:18:53 -0000	1.6
+++ http.h	9 Feb 2006 14:07:57 -0000	1.7
@@ -33,7 +33,7 @@
 	unsigned int is_parsed;
 } HTTP_header_t;
 
-HTTP_header_t*	http_new_header();
+HTTP_header_t*	http_new_header(void);
 void		http_free( HTTP_header_t *http_hdr );
 int		http_response_append( HTTP_header_t *http_hdr, char *data, int length );
 int		http_response_parse( HTTP_header_t *http_hdr );

Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- network.c	24 Dec 2005 18:17:39 -0000	1.121
+++ network.c	9 Feb 2006 14:07:57 -0000	1.122
@@ -93,7 +93,7 @@
 
 
 streaming_ctrl_t *
-streaming_ctrl_new( ) {
+streaming_ctrl_new(void) {
 	streaming_ctrl_t *streaming_ctrl;
 	streaming_ctrl = (streaming_ctrl_t*)malloc(sizeof(streaming_ctrl_t));
 	if( streaming_ctrl==NULL ) {

Index: network.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- network.h	29 May 2005 12:53:59 -0000	1.20
+++ network.h	9 Feb 2006 14:07:57 -0000	1.21
@@ -50,7 +50,7 @@
 } streaming_ctrl_t;
 
 //int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url );
-streaming_ctrl_t *streaming_ctrl_new();
+streaming_ctrl_t *streaming_ctrl_new(void);
 int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size);
 
 int nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctrl );

Index: tvi_def.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_def.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- tvi_def.h	6 Nov 2002 23:54:26 -0000	1.8
+++ tvi_def.h	9 Feb 2006 14:07:57 -0000	1.9
@@ -28,7 +28,7 @@
     get_audio_framesize
 };
 
-static tvi_handle_t *new_handle()
+static tvi_handle_t *new_handle(void)
 {
     tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t));
 

Index: yuv4mpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/yuv4mpeg.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- yuv4mpeg.c	8 Jan 2005 14:32:26 -0000	1.2
+++ yuv4mpeg.c	9 Feb 2006 14:07:57 -0000	1.3
@@ -101,7 +101,7 @@
  *************************************************************************/
 
 
-static char *y4m_new_xtag()
+static char *y4m_new_xtag(void)
 {
   return _y4m_alloc(Y4M_MAX_XTAG_SIZE * sizeof(char));
 }




More information about the MPlayer-cvslog mailing list