Mercurial > mplayer.hg
comparison libmpdemux/cue_read.c @ 17566:f580a7755ac5
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
author | rathann |
---|---|
date | Thu, 09 Feb 2006 14:08:03 +0000 |
parents | 6ff3379a0862 |
children |
comparison
equal
deleted
inserted
replaced
17565:dc65faaadb04 | 17566:f580a7755ac5 |
---|---|
266 | 266 |
267 static inline int cue_msf_2_sector(int minute, int second, int frame) { | 267 static inline int cue_msf_2_sector(int minute, int second, int frame) { |
268 return frame + (second + minute * 60 ) * 75; | 268 return frame + (second + minute * 60 ) * 75; |
269 } | 269 } |
270 | 270 |
271 static inline int cue_get_msf() { | 271 static inline int cue_get_msf(void) { |
272 return cue_msf_2_sector (cue_current_pos.minute, | 272 return cue_msf_2_sector (cue_current_pos.minute, |
273 cue_current_pos.second, | 273 cue_current_pos.second, |
274 cue_current_pos.frame); | 274 cue_current_pos.frame); |
275 } | 275 } |
276 | 276 |
431 } | 431 } |
432 | 432 |
433 | 433 |
434 | 434 |
435 | 435 |
436 static int cue_read_toc_entry() { | 436 static int cue_read_toc_entry(void) { |
437 | 437 |
438 int track = cue_current_pos.track - 1; | 438 int track = cue_current_pos.track - 1; |
439 | 439 |
440 /* check if its a valid track, if not return -1 */ | 440 /* check if its a valid track, if not return -1 */ |
441 if (track >= nTracks) | 441 if (track >= nTracks) |
478 cue_current_pos.minute = tracks[track].minute; | 478 cue_current_pos.minute = tracks[track].minute; |
479 | 479 |
480 return VCD_SECTOR_DATA * cue_get_msf(); | 480 return VCD_SECTOR_DATA * cue_get_msf(); |
481 } | 481 } |
482 | 482 |
483 static void cue_vcd_read_toc(){ | 483 static void cue_vcd_read_toc(void){ |
484 int i; | 484 int i; |
485 for (i = 0; i < nTracks; ++i) { | 485 for (i = 0; i < nTracks; ++i) { |
486 | 486 |
487 mp_msg(MSGT_OPEN,MSGL_INFO, | 487 mp_msg(MSGT_OPEN,MSGL_INFO, |
488 MSGTR_MPDEMUX_CUEREAD_InfoTrackFormat, | 488 MSGTR_MPDEMUX_CUEREAD_InfoTrackFormat, |