[Debburn-devel] [patch] code-cleanup: old-style function
declarations
Stefan Huehner
stefan at huehner.org
Sun Dec 31 15:39:47 CET 2006
Hi,
the attached patch converts the first bunch of old style-function
declarations i.e. using () for no parameters instead of (void) to the
(void) variant. In addition unneeded forward declarations were removed
were an equivalent declaration is already picked up by the toc.h header
file and some functions were made static which aren't used outside the
declaring sourcefile to remove another forward declaration.
Patch is against current svn-trunk
Regards,
Stefan
-------------- next part --------------
Index: icedax/toc.c
===================================================================
--- icedax/toc.c (revision 661)
+++ icedax/toc.c (working copy)
@@ -188,7 +188,7 @@
unsigned cdtracks = 0;
-int no_disguised_audiotracks()
+int no_disguised_audiotracks(void)
{
/* we can assume no audio tracks according to toc here. */
/* read a data sector from the first data track */
@@ -208,7 +208,7 @@
#undef SIM_ILLLEADOUT
-int ReadToc()
+int ReadToc(void)
{
int retval = (*doReadToc)( get_scsi_p() );
#if defined SIM_ILLLEADOUT
@@ -219,7 +219,7 @@
static int can_read_illleadout(void);
-static int can_read_illleadout()
+static int can_read_illleadout(void)
{
SCSI *usalp = get_scsi_p();
@@ -254,9 +254,7 @@
#endif
-int handle_cdtext(void);
-
-int handle_cdtext()
+int handle_cdtext(void)
{
#ifdef CD_TEXT
if (bufferTOC[0] == 0 && bufferTOC[1] == 0) {
@@ -305,7 +303,7 @@
only audio tracks in the first session and a data track
in the last session.
*/
-static unsigned is_multisession()
+static unsigned is_multisession(void)
{
unsigned mult_off;
#if defined CDROMMULTISESSION
@@ -555,7 +553,7 @@
return ret;
}
-void calc_cddb_id()
+void calc_cddb_id(void)
{
UINT4 i;
UINT4 t = 0;
@@ -573,7 +571,7 @@
#undef TESTCDINDEX
#ifdef TESTCDINDEX
-void TestGenerateId()
+void TestGenerateId(void)
{
SHA_INFO sha;
unsigned char digest[20], *base64;
@@ -1098,7 +1096,7 @@
* 2 multiple fuzzy matches have been found.
*/
int
-request_titles()
+request_titles(void)
{
int retval = 0;
int sock_fd;
@@ -1495,7 +1493,7 @@
static int IsSingleArtist(void);
/* check, if there are more than one track creators */
-static int IsSingleArtist()
+static int IsSingleArtist(void)
{
static struct iterator i;
InitIterator(&i, 1);
@@ -1731,7 +1729,7 @@
}
#endif
-static void dump_cdtext_info()
+static void dump_cdtext_info(void)
{
#ifdef CD_TEXT
/* interpret the contents of CD Text information based on an early draft
@@ -2306,7 +2304,7 @@
}
}
-void DisplayToc()
+void DisplayToc(void)
{
unsigned long dw;
@@ -2403,7 +2401,7 @@
static void Get_Set_MCN(void);
-static void Get_Set_MCN()
+static void Get_Set_MCN(void)
{
subq_chnl *sub_ch;
subq_catalog *subq_cat = NULL;
@@ -2704,7 +2702,7 @@
/* get and display Media Catalog Number ( one per disc )
* and Track International Standard Recording Codes (for each track)
*/
-void Read_MCN_ISRC()
+void Read_MCN_ISRC(void)
{
if ((global.verbose & SHOW_MCN) != 0) {
@@ -2846,7 +2844,7 @@
return (copy_bits_set >= 1 && copy_bits_set < 8);
}
-void Check_Toc()
+void Check_Toc(void)
{
/* detect layout */
@@ -3322,7 +3320,7 @@
MCN[13] = '\0';
}
-unsigned char *Get_MCN( )
+unsigned char *Get_MCN(void)
{
return MCN;
}
@@ -3401,7 +3399,7 @@
return 0;
}
-static int restrict_tracks_illleadout()
+static int restrict_tracks_illleadout(void)
{
struct TOC *o = &g_toc[cdtracks+1];
int i;
@@ -3513,9 +3511,7 @@
return -1;
}
-int useHiddenTrack(void);
-
-int useHiddenTrack()
+static int useHiddenTrack(void)
{
return 0;
}
@@ -3658,7 +3654,7 @@
return -1;
}
-long FirstTrack()
+long FirstTrack(void)
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3670,7 +3666,7 @@
return -1;
}
-long FirstAudioTrack()
+long FirstAudioTrack(void)
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3688,7 +3684,7 @@
return -1;
}
-long FirstDataTrack()
+long FirstDataTrack(void)
{
static struct iterator i;
if (i.reset == NULL) InitIterator(&i, 1);
@@ -3703,12 +3699,12 @@
return -1;
}
-long LastTrack()
+long LastTrack(void)
{
return g_toc[cdtracks].bTrack;
}
-long LastAudioTrack()
+long LastAudioTrack(void)
{
long j = -1;
static struct iterator i;
Index: icedax/wav.c
===================================================================
--- icedax/wav.c (revision 661)
+++ icedax/wav.c (working copy)
@@ -131,7 +131,7 @@
static unsigned long _GetHdrSize(void);
-static unsigned long _GetHdrSize()
+static unsigned long _GetHdrSize(void)
{
return sizeof( waveHdr );
}
Index: readom/readom.c
===================================================================
--- readom/readom.c (revision 661)
+++ readom/readom.c (working copy)
@@ -214,9 +214,9 @@
struct scsi_format_data fmt;
-/*XXX*/EXPORT BOOL cvt_cyls() { return (FALSE); }
-/*XXX*/EXPORT BOOL cvt_bcyls() { return (FALSE); }
-/*XXX*/EXPORT void print_defect_list() {}
+/*XXX*/EXPORT BOOL cvt_cyls(void) { return (FALSE); }
+/*XXX*/EXPORT BOOL cvt_bcyls(void) { return (FALSE); }
+/*XXX*/EXPORT void print_defect_list(void) {}
static void
usage(int ret)
@@ -603,7 +603,7 @@
* Return milliseconds since start time.
*/
static int
-prstats()
+prstats(void)
{
int sec;
int usec;
@@ -631,7 +631,7 @@
* Return milliseconds since start time, but be silent this time.
*/
static int
-prstats_silent()
+prstats_silent(void)
{
int sec;
int usec;
@@ -2180,7 +2180,7 @@
}
static void
-print_bad()
+print_bad(void)
{
int i;
More information about the Debburn-devel
mailing list