From: Josh Coalson Date: Wed, 31 Jan 2007 03:53:22 +0000 (+0000) Subject: convert C prototypes for functions with no args from () to (void) X-Git-Tag: 1.2.0~195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3ec2ad59ef4991f8f90422b39c2509535bcc56b;p=platform%2Fupstream%2Fflac.git convert C prototypes for functions with no args from () to (void) --- diff --git a/include/FLAC/metadata.h b/include/FLAC/metadata.h index f347268..c053266 100644 --- a/include/FLAC/metadata.h +++ b/include/FLAC/metadata.h @@ -360,7 +360,7 @@ extern FLAC_API const char * const FLAC__Metadata_SimpleIteratorStatusString[]; * \retval FLAC__Metadata_SimpleIterator* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(); +FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void); /** Free an iterator instance. Deletes the object pointed to by \a iterator. * @@ -723,7 +723,7 @@ extern FLAC_API const char * const FLAC__Metadata_ChainStatusString[]; * \retval FLAC__Metadata_Chain* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(); +FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(void); /** Free a chain instance. Deletes the object pointed to by \a chain. * @@ -1017,7 +1017,7 @@ FLAC_API void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain); * \retval FLAC__Metadata_Iterator* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(); +FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void); /** Free an iterator instance. Deletes the object pointed to by \a iterator. * @@ -1772,7 +1772,7 @@ FLAC_API int FLAC__metadata_object_vorbiscomment_remove_entries_matching(FLAC__S * \retval FLAC__StreamMetadata_CueSheet_Track* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(); +FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void); /** Create a copy of an existing CUESHEET track object. * diff --git a/include/FLAC/stream_decoder.h b/include/FLAC/stream_decoder.h index e28315c..3dd4ab7 100644 --- a/include/FLAC/stream_decoder.h +++ b/include/FLAC/stream_decoder.h @@ -739,7 +739,7 @@ typedef void (*FLAC__StreamDecoderErrorCallback)(const FLAC__StreamDecoder *deco * \retval FLAC__StreamDecoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(); +FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void); /** Free a decoder instance. Deletes the object pointed to by \a decoder. * diff --git a/include/FLAC/stream_encoder.h b/include/FLAC/stream_encoder.h index 9fca5a4..4febf17 100644 --- a/include/FLAC/stream_encoder.h +++ b/include/FLAC/stream_encoder.h @@ -690,7 +690,7 @@ typedef void (*FLAC__StreamEncoderProgressCallback)(const FLAC__StreamEncoder *e * \retval FLAC__StreamEncoder* * \c NULL if there was an error allocating memory, else the new instance. */ -FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(); +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void); /** Free an encoder instance. Deletes the object pointed to by \a encoder. * diff --git a/include/share/grabbag/file.h b/include/share/grabbag/file.h index 0164e3d..1b1c3aa 100644 --- a/include/share/grabbag/file.h +++ b/include/share/grabbag/file.h @@ -53,8 +53,8 @@ FLAC__bool grabbag__file_are_same(const char *f1, const char *f2); FLAC__bool grabbag__file_remove_file(const char *filename); /* these will forcibly set stdin/stdout to binary mode (for OSes that require it) */ -FILE *grabbag__file_get_binary_stdin(); -FILE *grabbag__file_get_binary_stdout(); +FILE *grabbag__file_get_binary_stdin(void); +FILE *grabbag__file_get_binary_stdout(void); #ifdef __cplusplus } diff --git a/src/flac/main.c b/src/flac/main.c index a833c7c..36109a0 100644 --- a/src/flac/main.c +++ b/src/flac/main.c @@ -58,21 +58,21 @@ typedef enum { RAW, WAV, AIF, FLAC, OGGFLAC } FileFormat; -static int do_it(); +static int do_it(void); -static FLAC__bool init_options(); +static FLAC__bool init_options(void); static int parse_options(int argc, char *argv[]); static int parse_option(int short_option, const char *long_option, const char *option_argument); -static void free_options(); +static void free_options(void); static void add_compression_setting_bool(compression_setting_type_t type, FLAC__bool value); static void add_compression_setting_string(compression_setting_type_t type, const char *value); static void add_compression_setting_unsigned(compression_setting_type_t type, unsigned value); static int usage_error(const char *message, ...); -static void short_usage(); -static void show_version(); -static void show_help(); -static void show_explain(); +static void short_usage(void); +static void show_version(void); +static void show_help(void); +static void show_explain(void); static void format_mistake(const char *infilename, FileFormat wrong, FileFormat right); static int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_last_file); @@ -305,7 +305,7 @@ int main(int argc, char *argv[]) return retval; } -int do_it() +int do_it(void) { int retval = 0; @@ -495,7 +495,7 @@ int do_it() return retval; } -FLAC__bool init_options() +FLAC__bool init_options(void) { option_values.show_help = false; option_values.show_explain = false; @@ -989,7 +989,7 @@ int parse_option(int short_option, const char *long_option, const char *option_a return 0; } -void free_options() +void free_options(void) { unsigned i; if(0 != option_values.filenames) { @@ -1051,12 +1051,12 @@ int usage_error(const char *message, ...) return 1; } -void show_version() +void show_version(void) { printf("flac %s\n", FLAC__VERSION_STRING); } -static void usage_header() +static void usage_header(void) { printf("===============================================================================\n"); printf("flac - Command-line FLAC encoder/decoder version %s\n", FLAC__VERSION_STRING); @@ -1078,7 +1078,7 @@ static void usage_header() printf("===============================================================================\n"); } -static void usage_summary() +static void usage_summary(void) { printf("Usage:\n"); printf("\n"); @@ -1089,7 +1089,7 @@ static void usage_summary() printf("\n"); } -void short_usage() +void short_usage(void) { usage_header(); printf("\n"); @@ -1108,7 +1108,7 @@ void short_usage() printf(" flac -t [INPUTFILE [...]]\n"); } -void show_help() +void show_help(void) { usage_header(); usage_summary(); @@ -1198,7 +1198,7 @@ void show_help() printf(" --no-verify\n"); } -void show_explain() +void show_explain(void) { usage_header(); usage_summary(); diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c index b7e3a32..6c2982e 100644 --- a/src/libFLAC/bitreader.c +++ b/src/libFLAC/bitreader.c @@ -257,7 +257,7 @@ static FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br) * ***********************************************************************/ -FLAC__BitReader *FLAC__bitreader_new() +FLAC__BitReader *FLAC__bitreader_new(void) { FLAC__BitReader *br = (FLAC__BitReader*)calloc(1, sizeof(FLAC__BitReader)); diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c index 953217d..0909adb 100644 --- a/src/libFLAC/bitwriter.c +++ b/src/libFLAC/bitwriter.c @@ -139,7 +139,7 @@ static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add) * ***********************************************************************/ -FLAC__BitWriter *FLAC__bitwriter_new() +FLAC__BitWriter *FLAC__bitwriter_new(void) { FLAC__BitWriter *bw = (FLAC__BitWriter*)calloc(1, sizeof(FLAC__BitWriter)); /* note that calloc() sets all members to 0 for us */ diff --git a/src/libFLAC/include/private/bitreader.h b/src/libFLAC/include/private/bitreader.h index 35a3d7d..6fd0147 100644 --- a/src/libFLAC/include/private/bitreader.h +++ b/src/libFLAC/include/private/bitreader.h @@ -46,7 +46,7 @@ typedef FLAC__bool (*FLAC__BitReaderReadCallback)(FLAC__byte buffer[], size_t *b /* * construction, deletion, initialization, etc functions */ -FLAC__BitReader *FLAC__bitreader_new(); +FLAC__BitReader *FLAC__bitreader_new(void); void FLAC__bitreader_delete(FLAC__BitReader *br); FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__BitReaderReadCallback rcb, void *cd); void FLAC__bitreader_free(FLAC__BitReader *br); /* does not 'free(br)' */ diff --git a/src/libFLAC/include/private/bitwriter.h b/src/libFLAC/include/private/bitwriter.h index 1ada096..aa5c4f7 100644 --- a/src/libFLAC/include/private/bitwriter.h +++ b/src/libFLAC/include/private/bitwriter.h @@ -44,7 +44,7 @@ typedef struct FLAC__BitWriter FLAC__BitWriter; /* * construction, deletion, initialization, etc functions */ -FLAC__BitWriter *FLAC__bitwriter_new(); +FLAC__BitWriter *FLAC__bitwriter_new(void); void FLAC__bitwriter_delete(FLAC__BitWriter *bw); FLAC__bool FLAC__bitwriter_init(FLAC__BitWriter *bw); void FLAC__bitwriter_free(FLAC__BitWriter *bw); /* does not 'free(buffer)' */ diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/cpu.h index d59c779..bb855a3 100644 --- a/src/libFLAC/include/private/cpu.h +++ b/src/libFLAC/include/private/cpu.h @@ -84,9 +84,9 @@ void FLAC__cpu_info(FLAC__CPUInfo *info); #ifndef FLAC__NO_ASM #ifdef FLAC__CPU_IA32 #ifdef FLAC__HAS_NASM -unsigned FLAC__cpu_info_asm_ia32(); -unsigned FLAC__cpu_info_extended_amd_asm_ia32(); -unsigned FLAC__cpu_info_sse_test_asm_ia32(); +unsigned FLAC__cpu_info_asm_ia32(void); +unsigned FLAC__cpu_info_extended_amd_asm_ia32(void); +unsigned FLAC__cpu_info_sse_test_asm_ia32(void); #endif #endif #endif diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c index 225d042..c69b139 100644 --- a/src/libFLAC/metadata_iterators.c +++ b/src/libFLAC/metadata_iterators.c @@ -374,7 +374,7 @@ FLAC_API const char * const FLAC__Metadata_SimpleIteratorStatusString[] = { }; -FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new() +FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void) { FLAC__Metadata_SimpleIterator *iterator = (FLAC__Metadata_SimpleIterator*)calloc(1, sizeof(FLAC__Metadata_SimpleIterator)); @@ -885,7 +885,7 @@ FLAC_API const char * const FLAC__Metadata_ChainStatusString[] = { }; -static FLAC__Metadata_Node *node_new_() +static FLAC__Metadata_Node *node_new_(void) { return (FLAC__Metadata_Node*)calloc(1, sizeof(FLAC__Metadata_Node)); } @@ -1439,7 +1439,7 @@ static FLAC__bool chain_rewrite_file_cb_(FLAC__Metadata_Chain *chain, FLAC__IOHa return true; } -FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new() +FLAC_API FLAC__Metadata_Chain *FLAC__metadata_chain_new(void) { FLAC__Metadata_Chain *chain = (FLAC__Metadata_Chain*)calloc(1, sizeof(FLAC__Metadata_Chain)); @@ -1772,7 +1772,7 @@ FLAC_API void FLAC__metadata_chain_sort_padding(FLAC__Metadata_Chain *chain) } -FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new() +FLAC_API FLAC__Metadata_Iterator *FLAC__metadata_iterator_new(void) { FLAC__Metadata_Iterator *iterator = (FLAC__Metadata_Iterator*)calloc(1, sizeof(FLAC__Metadata_Iterator)); diff --git a/src/libFLAC/metadata_object.c b/src/libFLAC/metadata_object.c index a8c6f50..d31a6a5 100644 --- a/src/libFLAC/metadata_object.c +++ b/src/libFLAC/metadata_object.c @@ -1411,7 +1411,7 @@ FLAC_API int FLAC__metadata_object_vorbiscomment_remove_entries_matching(FLAC__S return ok? (int)matching : -1; } -FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new() +FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void) { return (FLAC__StreamMetadata_CueSheet_Track*)calloc(1, sizeof(FLAC__StreamMetadata_CueSheet_Track)); } diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 8e29353..aef3a33 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -102,7 +102,7 @@ static FLAC__byte ID3V2_TAG_[3] = { 'I', 'D', '3' }; ***********************************************************************/ static void set_defaults_(FLAC__StreamDecoder *decoder); -static FILE *get_binary_stdin_(); +static FILE *get_binary_stdin_(void); static FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, unsigned size, unsigned channels); static FLAC__bool has_id_filtered_(FLAC__StreamDecoder *decoder, FLAC__byte *id); static FLAC__bool find_metadata_(FLAC__StreamDecoder *decoder); @@ -273,7 +273,7 @@ FLAC_API const char * const FLAC__StreamDecoderErrorStatusString[] = { * Class constructor/destructor * ***********************************************************************/ -FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new() +FLAC_API FLAC__StreamDecoder *FLAC__stream_decoder_new(void) { FLAC__StreamDecoder *decoder; unsigned i; @@ -1272,7 +1272,7 @@ void set_defaults_(FLAC__StreamDecoder *decoder) /* * This will forcibly set stdin to binary mode (for OSes that require it) */ -FILE *get_binary_stdin_() +FILE *get_binary_stdin_(void) { /* if something breaks here it is probably due to the presence or * absence of an underscore before the identifiers 'setmode', diff --git a/src/libFLAC/stream_encoder.c b/src/libFLAC/stream_encoder.c index cc25e68..cf75461 100644 --- a/src/libFLAC/stream_encoder.c +++ b/src/libFLAC/stream_encoder.c @@ -311,7 +311,7 @@ static FLAC__StreamEncoderReadStatus file_read_callback_(const FLAC__StreamEncod static FLAC__StreamEncoderSeekStatus file_seek_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data); static FLAC__StreamEncoderTellStatus file_tell_callback_(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data); static FLAC__StreamEncoderWriteStatus file_write_callback_(const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, unsigned samples, unsigned current_frame, void *client_data); -static FILE *get_binary_stdout_(); +static FILE *get_binary_stdout_(void); /*********************************************************************** @@ -510,7 +510,7 @@ static const unsigned OVERREAD_ = 1; * Class constructor/destructor * */ -FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new() +FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void) { FLAC__StreamEncoder *encoder; unsigned i; @@ -4497,7 +4497,7 @@ FLAC__StreamEncoderWriteStatus file_write_callback_(const FLAC__StreamEncoder *e /* * This will forcibly set stdout to binary mode (for OSes that require it) */ -FILE *get_binary_stdout_() +FILE *get_binary_stdout_(void) { /* if something breaks here it is probably due to the presence or * absence of an underscore before the identifiers 'setmode', diff --git a/src/metaflac/operations.c b/src/metaflac/operations.c index e60cf4c..367307d 100644 --- a/src/metaflac/operations.c +++ b/src/metaflac/operations.c @@ -30,7 +30,7 @@ #include #include -static void show_version(); +static void show_version(void); static FLAC__bool do_major_operation(const CommandLineOptions *options); static FLAC__bool do_major_operation_on_file(const char *filename, const CommandLineOptions *options); static FLAC__bool do_major_operation__list(const char *filename, FLAC__Metadata_Chain *chain, const CommandLineOptions *options); @@ -90,7 +90,7 @@ FLAC__bool do_operations(const CommandLineOptions *options) * local routines */ -void show_version() +void show_version(void) { printf("metaflac %s\n", FLAC__VERSION_STRING); } diff --git a/src/plugin_common/charset.h b/src/plugin_common/charset.h index 229d744..c6743b6 100644 --- a/src/plugin_common/charset.h +++ b/src/plugin_common/charset.h @@ -30,7 +30,7 @@ * Prototypes * **************/ -char *FLAC_plugin__charset_get_current(); +char *FLAC_plugin__charset_get_current(void); char *FLAC_plugin__charset_convert_string(const char *string, char *from, char *to); /* returns 1 for success, 0 for failure or no iconv */ diff --git a/src/plugin_xmms/configure.c b/src/plugin_xmms/configure.c index 8adab10..f9170e9 100644 --- a/src/plugin_xmms/configure.c +++ b/src/plugin_xmms/configure.c @@ -783,7 +783,7 @@ void FLAC_XMMS__configure(void) gtk_widget_show_all(flac_configurewin); } -void FLAC_XMMS__aboutbox() +void FLAC_XMMS__aboutbox(void) { static GtkWidget *about_window; diff --git a/src/plugin_xmms/configure.h b/src/plugin_xmms/configure.h index 7164746..88b2e37 100644 --- a/src/plugin_xmms/configure.h +++ b/src/plugin_xmms/configure.h @@ -69,7 +69,7 @@ typedef struct { extern flac_config_t flac_cfg; extern void FLAC_XMMS__configure(void); -extern void FLAC_XMMS__aboutbox(); +extern void FLAC_XMMS__aboutbox(void); #endif diff --git a/src/plugin_xmms/fileinfo.c b/src/plugin_xmms/fileinfo.c index 1d5f0ad..5c74ab3 100644 --- a/src/plugin_xmms/fileinfo.c +++ b/src/plugin_xmms/fileinfo.c @@ -142,7 +142,7 @@ static void get_entry_tag(GtkEntry * entry, const char *name) free(utf8); } -static void show_tag() +static void show_tag(void) { set_entry_tag(GTK_ENTRY(title_entry) , FLAC_plugin__tags_get_tag_utf8(tags_, "TITLE")); set_entry_tag(GTK_ENTRY(artist_entry) , FLAC_plugin__tags_get_tag_utf8(tags_, "ARTIST")); @@ -195,7 +195,7 @@ static void remove_tag(GtkWidget * w, gpointer data) gtk_widget_destroy(window); } -static void show_file_info() +static void show_file_info(void) { FLAC__StreamMetadata streaminfo; struct stat _stat; @@ -239,7 +239,7 @@ static void show_file_info() } } -static void show_replaygain() +static void show_replaygain(void) { /* known limitation: If only one of gain and peak is set, neither will be shown. This is true for * both track and album replaygain tags. Written so it will be easy to fix, with some trouble. */ diff --git a/src/plugin_xmms/plugin.c b/src/plugin_xmms/plugin.c index 3229478..d27e956 100644 --- a/src/plugin_xmms/plugin.c +++ b/src/plugin_xmms/plugin.c @@ -75,14 +75,14 @@ typedef struct { DitherContext dither_context; } stream_data_struct; -static void FLAC_XMMS__init(); +static void FLAC_XMMS__init(void); static int FLAC_XMMS__is_our_file(char *filename); static void FLAC_XMMS__play_file(char *filename); -static void FLAC_XMMS__stop(); +static void FLAC_XMMS__stop(void); static void FLAC_XMMS__pause(short p); static void FLAC_XMMS__seek(int time); -static int FLAC_XMMS__get_time(); -static void FLAC_XMMS__cleanup(); +static int FLAC_XMMS__get_time(void); +static void FLAC_XMMS__cleanup(void); static void FLAC_XMMS__get_song_info(char *filename, char **title, int *length); static void *play_loop_(void *arg); @@ -141,7 +141,7 @@ static FLAC__bool is_big_endian_host_; static unsigned bitrate_history_[BITRATE_HIST_SIZE]; -InputPlugin *get_iplugin_info() +InputPlugin *get_iplugin_info(void) { flac_ip.description = g_strdup_printf("Reference FLAC Player v%s", FLAC__VERSION_STRING); return &flac_ip; @@ -154,7 +154,7 @@ void set_track_info(const char* title, int length_in_msec) } } -static gchar* homedir() +static gchar* homedir(void) { gchar *result; char *env_home = getenv("HOME"); @@ -177,7 +177,7 @@ static FLAC__bool is_http_source(const char *source) return 0 == strncasecmp(source, "http://", 7); } -void FLAC_XMMS__init() +void FLAC_XMMS__init(void) { ConfigFile *cfg; FLAC__uint32 test = 1; @@ -343,7 +343,7 @@ void FLAC_XMMS__play_file(char *filename) pthread_create(&decode_thread_, NULL, play_loop_, NULL); } -void FLAC_XMMS__stop() +void FLAC_XMMS__stop(void) { if(stream_data_.is_playing) { stream_data_.is_playing = false; @@ -372,7 +372,7 @@ void FLAC_XMMS__seek(int time) } } -int FLAC_XMMS__get_time() +int FLAC_XMMS__get_time(void) { if(audio_error_) return -2; @@ -382,7 +382,7 @@ int FLAC_XMMS__get_time() return flac_ip.output->output_time(); } -void FLAC_XMMS__cleanup() +void FLAC_XMMS__cleanup(void) { safe_decoder_delete_(decoder_); decoder_ = 0; diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c index dff861d..25b1299 100644 --- a/src/share/grabbag/file.c +++ b/src/share/grabbag/file.c @@ -155,7 +155,7 @@ FLAC__bool grabbag__file_remove_file(const char *filename) return grabbag__file_change_stats(filename, /*read_only=*/false) && 0 == unlink(filename); } -FILE *grabbag__file_get_binary_stdin() +FILE *grabbag__file_get_binary_stdin(void) { /* if something breaks here it is probably due to the presence or * absence of an underscore before the identifiers 'setmode', @@ -173,7 +173,7 @@ FILE *grabbag__file_get_binary_stdin() return stdin; } -FILE *grabbag__file_get_binary_stdout() +FILE *grabbag__file_get_binary_stdout(void) { /* if something breaks here it is probably due to the presence or * absence of an underscore before the identifiers 'setmode', diff --git a/src/share/replaygain_synthesis/replaygain_synthesis.c b/src/share/replaygain_synthesis/replaygain_synthesis.c index 430a40b..79b7285 100644 --- a/src/share/replaygain_synthesis/replaygain_synthesis.c +++ b/src/share/replaygain_synthesis/replaygain_synthesis.c @@ -90,7 +90,7 @@ * XORed values of both generators. */ -static unsigned int random_int_() +static unsigned int random_int_(void) { static const unsigned char parity_[256] = { 0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1, diff --git a/src/test_libFLAC/bitwriter.c b/src/test_libFLAC/bitwriter.c index a96daef..83fd437 100644 --- a/src/test_libFLAC/bitwriter.c +++ b/src/test_libFLAC/bitwriter.c @@ -50,7 +50,7 @@ struct FLAC__BitWriter { #define TOTAL_BITS(bw) ((bw)->words*sizeof(bwword)*8 + (bw)->bits) -FLAC__bool test_bitwriter() +FLAC__bool test_bitwriter(void) { FLAC__BitWriter *bw; FLAC__bool ok; diff --git a/src/test_libFLAC/bitwriter.h b/src/test_libFLAC/bitwriter.h index 0434259..d6f4b84 100644 --- a/src/test_libFLAC/bitwriter.h +++ b/src/test_libFLAC/bitwriter.h @@ -21,6 +21,6 @@ #include "FLAC/ordinals.h" -FLAC__bool test_bitwriter(); +FLAC__bool test_bitwriter(void); #endif diff --git a/src/test_libFLAC/decoders.c b/src/test_libFLAC/decoders.c index 42ab1eb..1cfa3ef 100644 --- a/src/test_libFLAC/decoders.c +++ b/src/test_libFLAC/decoders.c @@ -89,12 +89,12 @@ static FLAC__bool die_s_(const char *msg, const FLAC__StreamDecoder *decoder) return false; } -static void init_metadata_blocks_() +static void init_metadata_blocks_(void) { mutils__init_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_); } -static void free_metadata_blocks_() +static void free_metadata_blocks_(void) { mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_); } @@ -1013,7 +1013,7 @@ static FLAC__bool test_stream_decoder(Layer layer, FLAC__bool is_ogg) return true; } -FLAC__bool test_decoders() +FLAC__bool test_decoders(void) { FLAC__bool is_ogg = false; diff --git a/src/test_libFLAC/decoders.h b/src/test_libFLAC/decoders.h index a1c188a..54a4377 100644 --- a/src/test_libFLAC/decoders.h +++ b/src/test_libFLAC/decoders.h @@ -21,6 +21,6 @@ #include "FLAC/ordinals.h" -FLAC__bool test_decoders(); +FLAC__bool test_decoders(void); #endif diff --git a/src/test_libFLAC/encoders.c b/src/test_libFLAC/encoders.c index 038b078..441813f 100644 --- a/src/test_libFLAC/encoders.c +++ b/src/test_libFLAC/encoders.c @@ -78,12 +78,12 @@ static FLAC__bool die_s_(const char *msg, const FLAC__StreamEncoder *encoder) return false; } -static void init_metadata_blocks_() +static void init_metadata_blocks_(void) { mutils__init_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_); } -static void free_metadata_blocks_() +static void free_metadata_blocks_(void) { mutils__free_metadata_blocks(&streaminfo_, &padding_, &seektable_, &application1_, &application2_, &vorbiscomment_, &cuesheet_, &picture_, &unknown_); } @@ -489,7 +489,7 @@ static FLAC__bool test_stream_encoder(Layer layer, FLAC__bool is_ogg) return true; } -FLAC__bool test_encoders() +FLAC__bool test_encoders(void) { FLAC__bool is_ogg = false; diff --git a/src/test_libFLAC/encoders.h b/src/test_libFLAC/encoders.h index 291fdba..9e0bdcc 100644 --- a/src/test_libFLAC/encoders.h +++ b/src/test_libFLAC/encoders.h @@ -21,6 +21,6 @@ #include "FLAC/ordinals.h" -FLAC__bool test_encoders(); +FLAC__bool test_encoders(void); #endif diff --git a/src/test_libFLAC/format.c b/src/test_libFLAC/format.c index 9c55a9a..ce4c9d5 100644 --- a/src/test_libFLAC/format.c +++ b/src/test_libFLAC/format.c @@ -185,7 +185,7 @@ static struct { { 5, (const FLAC__byte*)"a=\xe1\xa5\x80", true } }; -FLAC__bool test_format() +FLAC__bool test_format(void) { unsigned i; diff --git a/src/test_libFLAC/format.h b/src/test_libFLAC/format.h index 2e7586b..3f4f2e6 100644 --- a/src/test_libFLAC/format.h +++ b/src/test_libFLAC/format.h @@ -21,6 +21,6 @@ #include "FLAC/ordinals.h" -FLAC__bool test_format(); +FLAC__bool test_format(void); #endif diff --git a/src/test_libFLAC/metadata.c b/src/test_libFLAC/metadata.c index a972d40..6429380 100644 --- a/src/test_libFLAC/metadata.c +++ b/src/test_libFLAC/metadata.c @@ -23,10 +23,10 @@ #include "metadata.h" #include -extern FLAC__bool test_metadata_object(); -extern FLAC__bool test_metadata_file_manipulation(); +extern FLAC__bool test_metadata_object(void); +extern FLAC__bool test_metadata_file_manipulation(void); -FLAC__bool test_metadata() +FLAC__bool test_metadata(void) { if(!test_metadata_object()) return false; diff --git a/src/test_libFLAC/metadata.h b/src/test_libFLAC/metadata.h index 6c931e4..14e843a 100644 --- a/src/test_libFLAC/metadata.h +++ b/src/test_libFLAC/metadata.h @@ -21,6 +21,6 @@ #include "FLAC/ordinals.h" -FLAC__bool test_metadata(); +FLAC__bool test_metadata(void); #endif diff --git a/src/test_libFLAC/metadata_manip.c b/src/test_libFLAC/metadata_manip.c index 6a1cc52..0cb146d 100644 --- a/src/test_libFLAC/metadata_manip.c +++ b/src/test_libFLAC/metadata_manip.c @@ -681,7 +681,7 @@ static FLAC__bool remove_file_(const char *filename) return true; } -static FLAC__bool test_level_0_() +static FLAC__bool test_level_0_(void) { FLAC__StreamMetadata streaminfo; FLAC__StreamMetadata *tags = 0; @@ -760,7 +760,7 @@ static FLAC__bool test_level_0_() return true; } -static FLAC__bool test_level_1_() +static FLAC__bool test_level_1_(void) { FLAC__Metadata_SimpleIterator *iterator; FLAC__StreamMetadata *block, *app, *padding; @@ -2093,7 +2093,7 @@ static FLAC__bool test_level_2_misc_(FLAC__bool is_ogg) return true; } -FLAC__bool test_metadata_file_manipulation() +FLAC__bool test_metadata_file_manipulation(void) { printf("\n+++ libFLAC unit test: metadata manipulation\n\n"); diff --git a/src/test_libFLAC/metadata_object.c b/src/test_libFLAC/metadata_object.c index 109d5d5..25ab76c 100644 --- a/src/test_libFLAC/metadata_object.c +++ b/src/test_libFLAC/metadata_object.c @@ -513,7 +513,7 @@ static void pi_set_data(FLAC__StreamMetadata *block, const FLAC__byte *data, FLA block->length += len; } -FLAC__bool test_metadata_object() +FLAC__bool test_metadata_object(void) { FLAC__StreamMetadata *block, *blockcopy, *vorbiscomment, *cuesheet, *picture; FLAC__StreamMetadata_SeekPoint seekpoint_array[14]; diff --git a/src/test_streams/main.c b/src/test_streams/main.c index a864783..a524c29 100644 --- a/src/test_streams/main.c +++ b/src/test_streams/main.c @@ -182,7 +182,7 @@ static FLAC__bool write_sane_extended(FILE *f, unsigned val) } /* a mono one-sample 16bps stream */ -static FLAC__bool generate_01() +static FLAC__bool generate_01(void) { FILE *f; FLAC__int16 x = -32768; @@ -201,7 +201,7 @@ foo: } /* a stereo one-sample 16bps stream */ -static FLAC__bool generate_02() +static FLAC__bool generate_02(void) { FILE *f; FLAC__int16 xl = -32768, xr = 32767; @@ -222,7 +222,7 @@ foo: } /* a mono five-sample 16bps stream */ -static FLAC__bool generate_03() +static FLAC__bool generate_03(void) { FILE *f; FLAC__int16 x[] = { -25, 0, 25, 50, 100 }; @@ -243,7 +243,7 @@ foo: } /* a stereo five-sample 16bps stream */ -static FLAC__bool generate_04() +static FLAC__bool generate_04(void) { FILE *f; FLAC__int16 x[] = { -25, 500, 0, 400, 25, 300, 50, 200, 100, 100 }; @@ -675,7 +675,7 @@ foo: return false; } -static FLAC__bool generate_wackywavs() +static FLAC__bool generate_wackywavs(void) { FILE *f; FLAC__byte wav[] = {