diff options
author | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-09 14:08:03 +0000 |
---|---|---|
committer | rathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-02-09 14:08:03 +0000 |
commit | e7db4ccf1afbb6653ae1aae44b1c96c724361985 (patch) | |
tree | 9cc7321a75460de67bd0dae4e940b73439a1374b /libmpdemux | |
parent | 1f34ddefd2546a37c6efe4fcd9ea3f7627af4a5d (diff) | |
download | mpv-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 'libmpdemux')
-rw-r--r-- | libmpdemux/cookies.c | 2 | ||||
-rw-r--r-- | libmpdemux/cue_read.c | 6 | ||||
-rw-r--r-- | libmpdemux/demux_ogg.c | 2 | ||||
-rw-r--r-- | libmpdemux/demux_ty_osd.c | 6 | ||||
-rw-r--r-- | libmpdemux/dvbin.c | 2 | ||||
-rw-r--r-- | libmpdemux/dvbin.h | 2 | ||||
-rw-r--r-- | libmpdemux/http.c | 2 | ||||
-rw-r--r-- | libmpdemux/http.h | 2 | ||||
-rw-r--r-- | libmpdemux/network.c | 2 | ||||
-rw-r--r-- | libmpdemux/network.h | 2 | ||||
-rw-r--r-- | libmpdemux/realrtsp/asmrp.c | 2 | ||||
-rw-r--r-- | libmpdemux/tvi_def.h | 2 | ||||
-rw-r--r-- | libmpdemux/yuv4mpeg.c | 2 |
13 files changed, 17 insertions, 17 deletions
diff --git a/libmpdemux/cookies.c b/libmpdemux/cookies.c index ca328f9b4b..65745872d2 100644 --- a/libmpdemux/cookies.c +++ b/libmpdemux/cookies.c @@ -159,7 +159,7 @@ static struct cookie_list_type *load_cookies_from(const char *filename, } /* 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; diff --git a/libmpdemux/cue_read.c b/libmpdemux/cue_read.c index 4485f2ddc3..ecd568fa27 100644 --- a/libmpdemux/cue_read.c +++ b/libmpdemux/cue_read.c @@ -268,7 +268,7 @@ static inline int cue_msf_2_sector(int minute, int second, int frame) { 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_cue (char *in_cue_filename) -static int cue_read_toc_entry() { +static int cue_read_toc_entry(void) { int track = cue_current_pos.track - 1; @@ -480,7 +480,7 @@ static int cue_vcd_get_track_end (int track){ 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) { diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 084950bf53..f2424c4dff 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -221,7 +221,7 @@ uint64_t get_uint64 (const void *buf) 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++) { diff --git a/libmpdemux/demux_ty_osd.c b/libmpdemux/demux_ty_osd.c index 17f27e429f..d68c7a5ff7 100644 --- a/libmpdemux/demux_ty_osd.c +++ b/libmpdemux/demux_ty_osd.c @@ -63,7 +63,7 @@ static subtitle *ty_pOSD2; 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 @@ static void ty_drawchar( char c ) *( 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_AddXDSToDisplay( char *format, ... ) } -static void ty_DisplayXDSInfo() +static void ty_DisplayXDSInfo(void) { int index; int size; diff --git a/libmpdemux/dvbin.c b/libmpdemux/dvbin.c index d40073937c..0351aab5a2 100644 --- a/libmpdemux/dvbin.c +++ b/libmpdemux/dvbin.c @@ -767,7 +767,7 @@ static int dvb_open(stream_t *stream, int mode, void *opts, int *file_format) } #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; diff --git a/libmpdemux/dvbin.h b/libmpdemux/dvbin.h index a4795c42b7..02c75b67d4 100644 --- a/libmpdemux/dvbin.h +++ b/libmpdemux/dvbin.h @@ -109,6 +109,6 @@ typedef struct { 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 diff --git a/libmpdemux/http.c b/libmpdemux/http.c index 914d8de9df..0cc1bb3633 100644 --- a/libmpdemux/http.c +++ b/libmpdemux/http.c @@ -279,7 +279,7 @@ static int nop_streaming_start( stream_t *stream ) { } 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)); diff --git a/libmpdemux/http.h b/libmpdemux/http.h index b7332fe057..628de0f4e3 100644 --- a/libmpdemux/http.h +++ b/libmpdemux/http.h @@ -33,7 +33,7 @@ typedef struct { 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 ); diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 5ec0c4c7f9..bd1c5e34e2 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -93,7 +93,7 @@ mime_struct_t mime_type_table[] = { 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 ) { diff --git a/libmpdemux/network.h b/libmpdemux/network.h index 0cebbcbc4e..0081c88256 100644 --- a/libmpdemux/network.h +++ b/libmpdemux/network.h @@ -50,7 +50,7 @@ typedef struct streaming_control { } 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 ); diff --git a/libmpdemux/realrtsp/asmrp.c b/libmpdemux/realrtsp/asmrp.c index d011458d45..05953daeb8 100644 --- a/libmpdemux/realrtsp/asmrp.c +++ b/libmpdemux/realrtsp/asmrp.c @@ -95,7 +95,7 @@ typedef struct { } asmrp_t; -static asmrp_t *asmrp_new () { +static asmrp_t *asmrp_new (void) { asmrp_t *p; diff --git a/libmpdemux/tvi_def.h b/libmpdemux/tvi_def.h index 8e84ad1493..27b797c603 100644 --- a/libmpdemux/tvi_def.h +++ b/libmpdemux/tvi_def.h @@ -28,7 +28,7 @@ static tvi_functions_t functions = 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)); diff --git a/libmpdemux/yuv4mpeg.c b/libmpdemux/yuv4mpeg.c index 3baac3eab9..f746da21c2 100644 --- a/libmpdemux/yuv4mpeg.c +++ b/libmpdemux/yuv4mpeg.c @@ -101,7 +101,7 @@ ssize_t y4m_write(int fd, char *buf, size_t len) *************************************************************************/ -static char *y4m_new_xtag() +static char *y4m_new_xtag(void) { return _y4m_alloc(Y4M_MAX_XTAG_SIZE * sizeof(char)); } |