Commit e3ec2ad5 authored by Josh Coalson's avatar Josh Coalson
Browse files

convert C prototypes for functions with no args from () to (void)

parent 44eead85
......@@ -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.
*
......
......@@ -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.
*
......
......@@ -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.
*
......
......@@ -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
}
......
......@@ -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();
......
......@@ -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));
......
......@@ -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 */
......
......@@ -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)' */
......
......@@ -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)' */
......
......@@ -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
......
......@@ -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));
......
......@@ -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));
}
......
......@@ -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',
......
......@@ -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',
......
......@@ -30,7 +30,7 @@
#include <stdlib.h>
#include <string.h>
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);
}
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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
......
......@@ -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. */
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment