*: change C-style prototypes, drop "(void)"

This commit is contained in:
Max Kellermann 2015-03-03 20:05:08 +01:00
parent cd776ff1a8
commit 1c90b0c19d
28 changed files with 74 additions and 53 deletions

View File

@ -26,6 +26,7 @@ AudioFormat
getOutputAudioFormat(AudioFormat inFormat);
/* make sure initPlayerData is called before this function!! */
void initAudioConfig(void);
void
initAudioConfig();
#endif

View File

@ -25,7 +25,7 @@
class EventLoop;
void
io_thread_init(void);
io_thread_init();
void
io_thread_start();
@ -36,7 +36,7 @@ io_thread_start();
* only.
*/
void
io_thread_run(void);
io_thread_run();
/**
* Ask the I/O thread to quit, but does not wait for it. Usually, you
@ -44,10 +44,10 @@ io_thread_run(void);
* includes this.
*/
void
io_thread_quit(void);
io_thread_quit();
void
io_thread_deinit(void);
io_thread_deinit();
gcc_const
EventLoop &
@ -58,6 +58,6 @@ io_thread_get();
*/
gcc_pure
bool
io_thread_inside(void);
io_thread_inside();
#endif

View File

@ -78,13 +78,13 @@ idle_add(unsigned flags);
* Atomically reads and resets the global idle flags value.
*/
unsigned
idle_get(void);
idle_get();
/**
* Get idle names
*/
const char*const*
idle_get_names(void);
idle_get_names();
/**
* Parse an idle name and return its mask. Returns 0 if the given

View File

@ -37,10 +37,11 @@ bool
log_init(bool verbose, bool use_stdout, Error &error);
void
log_deinit(void);
log_deinit();
void setup_log_output(bool use_stdout);
int cycle_log_files(void);
int
cycle_log_files();
#endif /* LOG_H */

View File

@ -61,7 +61,7 @@ win32_main(int argc, char *argv[]);
* This function should be called just before entering main loop.
*/
void
win32_app_started(void);
win32_app_started();
/**
* When running as a service reports to service control manager
@ -71,7 +71,7 @@ win32_app_started(void);
* This function should be called just after leaving main loop.
*/
void
win32_app_stopping(void);
win32_app_stopping();
#endif

View File

@ -36,7 +36,8 @@ class AllocatedPath;
void
mapper_init(AllocatedPath &&playlist_dir);
void mapper_finish(void);
void
mapper_finish();
#ifdef ENABLE_DATABASE
@ -68,7 +69,7 @@ map_fs_to_utf8(Path path_fs);
*/
gcc_const
const AllocatedPath &
map_spl_path(void);
map_spl_path();
/**
* Maps a playlist name (without the ".m3u" suffix) to a file system

View File

@ -28,8 +28,10 @@ static constexpr unsigned PERMISSION_ADMIN = 8;
int getPermissionFromPassword(char const* password, unsigned* permission);
unsigned getDefaultPermissions(void);
unsigned
getDefaultPermissions();
void initPermissions(void);
void
initPermissions();
#endif

View File

@ -36,7 +36,7 @@ extern bool playlist_saveAbsolutePaths;
* Perform some global initialization, e.g. load configuration values.
*/
void
spl_global_init(void);
spl_global_init();
/**
* Determines whether the specified string is a valid name for a

View File

@ -29,14 +29,15 @@ extern float replay_gain_preamp;
extern float replay_gain_missing_preamp;
extern bool replay_gain_limit;
void replay_gain_global_init(void);
void
replay_gain_global_init();
/**
* Returns the current replay gain mode as a machine-readable string.
*/
gcc_pure
const char *
replay_gain_get_mode_string(void);
replay_gain_get_mode_string();
/**
* Sets the replay gain mode, parsed from a string.

View File

@ -22,7 +22,8 @@
class Client;
void stats_global_init(void);
void
stats_global_init();
void
stats_invalidate();

View File

@ -39,9 +39,11 @@ const ArchivePlugin *
archive_plugin_from_name(const char *name);
/* this is where we "load" all the "plugins" ;-) */
void archive_plugin_init_all(void);
void
archive_plugin_init_all();
/* this is where we "unload" all the "plugins" */
void archive_plugin_deinit_all(void);
void
archive_plugin_deinit_all();
#endif

View File

@ -32,13 +32,13 @@ struct ArchivePlugin {
* have/need one this must false if there is an error and
* true otherwise
*/
bool (*init)(void);
bool (*init)();
/**
* optional, set this to nullptr if the archive plugin doesn't
* have/need one
*/
void (*finish)(void);
void (*finish)();
/**
* tryes to open archive file and associates handle with archive

View File

@ -200,7 +200,8 @@ private:
virtual void OnTimeout() override;
};
void client_manager_init(void);
void
client_manager_init();
void
client_new(EventLoop &loop, Partition &partition,

View File

@ -257,7 +257,8 @@ handle_not_commands(Client &client, gcc_unused ConstBuffer<const char *> args)
return CommandResult::OK;
}
void command_init(void)
void
command_init()
{
#ifndef NDEBUG
/* ensure that the command list is sorted */
@ -266,7 +267,8 @@ void command_init(void)
#endif
}
void command_finish(void)
void
command_finish()
{
}

View File

@ -24,9 +24,11 @@
class Client;
void command_init(void);
void
command_init();
void command_finish(void);
void
command_finish();
CommandResult
command_process(Client &client, unsigned num, char *line);

View File

@ -29,14 +29,18 @@ class AllocatedPath;
struct config_param;
struct ConfigBlock;
void config_global_init(void);
void config_global_finish(void);
void
config_global_init();
void
config_global_finish();
/**
* Call this function after all configuration has been evaluated. It
* checks for unused parameters, and logs warnings.
*/
void config_global_check(void);
void
config_global_check();
bool
ReadConfigFile(Path path, Error &error);

View File

@ -32,6 +32,6 @@ mpd_inotify_init(EventLoop &loop, Storage &storage, UpdateService &update,
unsigned max_depth);
void
mpd_inotify_finish(void);
mpd_inotify_finish();
#endif

View File

@ -34,10 +34,12 @@ const struct DecoderPlugin *
decoder_plugin_from_name(const char *name);
/* this is where we "load" all the "plugins" ;-) */
void decoder_plugin_init_all(void);
void
decoder_plugin_init_all();
/* this is where we "unload" all the "plugins" */
void decoder_plugin_deinit_all(void);
void
decoder_plugin_deinit_all();
template<typename F>
static inline const DecoderPlugin *

View File

@ -50,7 +50,7 @@ struct DecoderPlugin {
* Deinitialize a decoder plugin which was initialized
* successfully. Optional method.
*/
void (*finish)(void);
void (*finish)();
/**
* Decode a stream (data read from an #InputStream object).

View File

@ -33,7 +33,7 @@ class Filter;
* Creates a new filter chain.
*/
Filter *
filter_chain_new(void);
filter_chain_new();
/**
* Appends a new filter at the end of the filter chain. You must call

View File

@ -31,6 +31,7 @@ input_stream_global_init(Error &error);
/**
* Deinitializes this library and all #InputStream implementations.
*/
void input_stream_global_finish(void);
void
input_stream_global_finish();
#endif

View File

@ -75,7 +75,7 @@ struct InputPlugin {
* Global deinitialization. Called once before MPD shuts
* down (only if init() has returned true).
*/
void (*finish)(void);
void (*finish)();
InputStream *(*open)(const char *uri,
Mutex &mutex, Cond &cond,

View File

@ -49,6 +49,6 @@ save_sw_volume_state(BufferedOutputStream &os);
*/
gcc_pure
unsigned
sw_volume_state_get_hash(void);
sw_volume_state_get_hash();
#endif

View File

@ -44,7 +44,7 @@ struct AudioOutputPlugin {
* Test if this plugin can provide a default output, in case
* none has been configured. This method is optional.
*/
bool (*test_default_device)(void);
bool (*test_default_device)();
/**
* Configure and initialize the device, but do not open it

View File

@ -41,6 +41,6 @@ audio_output_state_save(BufferedOutputStream &os,
* whether the state has changed and the state file should be saved.
*/
unsigned
audio_output_state_get_version(void);
audio_output_state_get_version();
#endif

View File

@ -44,7 +44,7 @@ struct playlist_plugin {
* Deinitialize a plugin which was initialized successfully.
* Optional method.
*/
void (*finish)(void);
void (*finish)();
/**
* Opens the playlist on the specified URI. This URI has

View File

@ -37,13 +37,13 @@ extern const struct playlist_plugin *const playlist_plugins[];
* Initializes all playlist plugins.
*/
void
playlist_list_global_init(void);
playlist_list_global_init();
/**
* Deinitializes all playlist plugins.
*/
void
playlist_list_global_finish(void);
playlist_list_global_finish();
/**
* Opens a playlist by its URI.

View File

@ -33,10 +33,10 @@ daemonize_init(const char *user, const char *group, AllocatedPath &&pidfile)
#ifndef WIN32
void
daemonize_finish(void);
daemonize_finish();
#else
static inline void
daemonize_finish(void)
daemonize_finish()
{ /* nop */ }
#endif
@ -46,11 +46,11 @@ daemonize_finish(void)
*/
#ifndef WIN32
void
daemonize_kill(void);
daemonize_kill();
#else
#include "system/FatalError.hxx"
static inline void
daemonize_kill(void)
daemonize_kill()
{
FatalError("--kill is not available on WIN32");
}
@ -61,10 +61,10 @@ daemonize_kill(void)
*/
#ifndef WIN32
void
daemonize_close_stdin(void);
daemonize_close_stdin();
#else
static inline void
daemonize_close_stdin(void) {}
daemonize_close_stdin() {}
#endif
/**
@ -72,10 +72,10 @@ daemonize_close_stdin(void) {}
*/
#ifndef WIN32
void
daemonize_set_user(void);
daemonize_set_user();
#else
static inline void
daemonize_set_user(void)
daemonize_set_user()
{ /* nop */ }
#endif