aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.h16
-rw-r--r--src/audioOutput.h4
-rw-r--r--src/charConv.c2
-rw-r--r--src/command.c2
-rw-r--r--src/command.h4
-rw-r--r--src/conf.c4
-rw-r--r--src/conf.h4
-rw-r--r--src/dbUtils.h2
-rw-r--r--src/decode.c2
-rw-r--r--src/decode.h2
-rw-r--r--src/directory.c10
-rw-r--r--src/directory.h18
-rw-r--r--src/inputPlugin.h4
-rw-r--r--src/inputStream.h2
-rw-r--r--src/inputStream_file.h2
-rw-r--r--src/inputStream_http.h2
-rw-r--r--src/interface.h8
-rw-r--r--src/listen.h6
-rw-r--r--src/log.h2
-rw-r--r--src/ls.c2
-rw-r--r--src/mp4ff/mp4ff.c24
-rw-r--r--src/mp4ff/mp4tagupdate.c34
-rw-r--r--src/normalize.h4
-rw-r--r--src/path.h6
-rw-r--r--src/permission.h7
-rw-r--r--src/player.c2
-rw-r--r--src/player.h42
-rw-r--r--src/playerData.h6
-rw-r--r--src/playlist.c16
-rw-r--r--src/playlist.h20
-rw-r--r--src/replayGain.h4
-rw-r--r--src/sig_handlers.c2
-rw-r--r--src/sig_handlers.h18
-rw-r--r--src/song.h4
-rw-r--r--src/stats.h2
-rw-r--r--src/tag.h4
-rw-r--r--src/tree.c3
-rw-r--r--src/utils.h2
-rw-r--r--src/volume.h8
39 files changed, 154 insertions, 152 deletions
diff --git a/src/audio.h b/src/audio.h
index 7a811d9db..d2703ce4f 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -45,23 +45,23 @@ void getOutputAudioFormat(AudioFormat * inFormat, AudioFormat * outFormat);
int parseAudioConfig(AudioFormat * audioFormat, char *conf);
/* make sure initPlayerData is called before this function!! */
-void initAudioConfig();
+void initAudioConfig(void);
-void finishAudioConfig();
+void finishAudioConfig(void);
-void initAudioDriver();
+void initAudioDriver(void);
-void finishAudioDriver();
+void finishAudioDriver(void);
int openAudioDevice(AudioFormat * audioFormat);
int playAudio(char *playChunk, int size);
-void dropBufferedAudio();
+void dropBufferedAudio(void);
-void closeAudioDevice();
+void closeAudioDevice(void);
-int isAudioDeviceOpen();
+int isAudioDeviceOpen(void);
int isCurrentAudioFormat(AudioFormat * audioFormat);
@@ -79,5 +79,5 @@ void readAudioDevicesState(FILE *fp);
void saveAudioDevicesState(FILE *fp);
-void loadAudioDrivers();
+void loadAudioDrivers(void);
#endif
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 192c93270..c6e3a37c7 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -95,8 +95,8 @@ typedef struct _AudioOutputPlugin {
AudioOutputSendMetadataFunc sendMetdataFunc;
} AudioOutputPlugin;
-void initAudioOutputPlugins();
-void finishAudioOutputPlugins();
+void initAudioOutputPlugins(void);
+void finishAudioOutputPlugins(void);
void loadAudioOutputPlugin(AudioOutputPlugin * audioOutputPlugin);
void unloadAudioOutputPlugin(AudioOutputPlugin * audioOutputPlugin);
diff --git a/src/charConv.c b/src/charConv.c
index 4e4aa864a..870e6c3e2 100644
--- a/src/charConv.c
+++ b/src/charConv.c
@@ -41,7 +41,7 @@ mpd_sint8 char_conv_latin1ToUtf8 = 0;
#define BUFFER_SIZE 1024
-static void closeCharSetConversion();
+static void closeCharSetConversion(void);
int setCharSetConversion(char *to, char *from)
{
diff --git a/src/command.c b/src/command.c
index f32a03466..a642ac2af 100644
--- a/src/command.c
+++ b/src/command.c
@@ -138,7 +138,7 @@ static CommandEntry *getCommandEntryFromString(char *string, int *permission);
static List *commandList;
-CommandEntry *newCommandEntry(void)
+static CommandEntry *newCommandEntry(void)
{
CommandEntry *cmd = malloc(sizeof(CommandEntry));
cmd->cmd = NULL;
diff --git a/src/command.h b/src/command.h
index 6cdc4ed44..43be9a0b4 100644
--- a/src/command.h
+++ b/src/command.h
@@ -39,9 +39,9 @@ int processListOfCommands(int fd, int *permission, int *expired,
int processCommand(int fd, int *permission, char *commandString);
-void initCommands();
+void initCommands(void);
-void finishCommands();
+void finishCommands(void);
#define commandSuccess(fd) fdprintf(fd, "OK\n")
diff --git a/src/conf.c b/src/conf.c
index 03680de82..c12a6f292 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -89,7 +89,7 @@ static void freeConfigParam(ConfigParam * param)
free(param);
}
-ConfigEntry *newConfigEntry(int repeatable, int block)
+static ConfigEntry *newConfigEntry(int repeatable, int block)
{
ConfigEntry *ret = malloc(sizeof(ConfigEntry));
@@ -105,7 +105,7 @@ ConfigEntry *newConfigEntry(int repeatable, int block)
return ret;
}
-void freeConfigEntry(ConfigEntry * entry)
+static void freeConfigEntry(ConfigEntry * entry)
{
freeList(entry->configParamList);
free(entry);
diff --git a/src/conf.h b/src/conf.h
index 111295482..bebc62798 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -73,8 +73,8 @@ typedef struct _ConfigParam {
int numberOfBlockParams;
} ConfigParam;
-void initConf();
-void finishConf();
+void initConf(void);
+void finishConf(void);
void readConf(char *file);
diff --git a/src/dbUtils.h b/src/dbUtils.h
index 7dd63a168..1fc7e1053 100644
--- a/src/dbUtils.h
+++ b/src/dbUtils.h
@@ -61,6 +61,6 @@ unsigned long sumSongTimesIn(int fd, char *name);
int listAllUniqueTags(int fd, int type, int numConditiionals,
LocateTagItem * conditionals);
-void printSavedMemoryFromFilenames();
+void printSavedMemoryFromFilenames(void);
#endif
diff --git a/src/decode.c b/src/decode.c
index 158727f6f..1cfa03e5a 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -487,7 +487,7 @@ static void advanceOutputBufferTo(OutputBuffer * cb, PlayerControl * pc,
}
}
-void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb)
+static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb)
{
int pause = 0;
int quit = 0;
diff --git a/src/decode.h b/src/decode.h
index 5b502b873..2b7b314a4 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -64,6 +64,6 @@ typedef struct _DecoderControl {
void decodeSigHandler(int sig, siginfo_t * siginfo, void *v);
-void decode();
+void decode(void);
#endif
diff --git a/src/directory.c b/src/directory.c
index 51702d4b0..0457f8bbc 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -249,6 +249,11 @@ static void freeDirectoryStatFromDirectory(Directory * dir)
dir->stat = NULL;
}
+static DirectoryList *newDirectoryList(void)
+{
+ return makeList((ListFreeDataFunc *) freeDirectory, 1);
+}
+
static Directory *newDirectory(char *dirname, Directory * parent)
{
Directory *directory;
@@ -279,11 +284,6 @@ static void freeDirectory(Directory * directory)
/*getDirectoryPath(NULL); */
}
-static DirectoryList *newDirectoryList(void)
-{
- return makeList((ListFreeDataFunc *) freeDirectory, 1);
-}
-
static void freeDirectoryList(DirectoryList * directoryList)
{
freeList(directoryList);
diff --git a/src/directory.h b/src/directory.h
index 975b32ae2..77ff609ff 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -39,31 +39,31 @@ typedef struct _Directory {
DirectoryStat *stat;
} Directory;
-void readDirectoryDBIfUpdateIsFinished();
+void readDirectoryDBIfUpdateIsFinished(void);
-int isUpdatingDB();
+int isUpdatingDB(void);
void directory_sigChldHandler(int pid, int status);
int updateInit(int fd, List * pathList);
-void initMp3Directory();
+void initMp3Directory(void);
-void closeMp3Directory();
+void closeMp3Directory(void);
int printDirectoryInfo(int fd, char *dirname);
-int checkDirectoryDB();
+int checkDirectoryDB(void);
-int writeDirectoryDB();
+int writeDirectoryDB(void);
-int readDirectoryDB();
+int readDirectoryDB(void);
-void updateMp3Directory();
+void updateMp3Directory(void);
Song *getSongFromDB(char *file);
-time_t getDbModTime();
+time_t getDbModTime(void);
int traverseAllIn(int fd, char *name,
int (*forEachSong) (int, Song *, void *),
diff --git a/src/inputPlugin.h b/src/inputPlugin.h
index d32ca59e2..7f40acc7c 100644
--- a/src/inputPlugin.h
+++ b/src/inputPlugin.h
@@ -91,9 +91,9 @@ InputPlugin *getInputPluginFromName(char *name);
void printAllInputPluginSuffixes(FILE * fp);
/* this is where we "load" all the "plugins" ;-) */
-void initInputPlugins();
+void initInputPlugins(void);
/* this is where we "unload" all the "plugins" */
-void finishInputPlugins();
+void finishInputPlugins(void);
#endif
diff --git a/src/inputStream.h b/src/inputStream.h
index a5a878b5e..52d7568c6 100644
--- a/src/inputStream.h
+++ b/src/inputStream.h
@@ -49,7 +49,7 @@ struct _InputStream {
char *metaTitle;
};
-void initInputStream();
+void initInputStream(void);
int isUrlSaneForInputStream(char *url);
diff --git a/src/inputStream_file.h b/src/inputStream_file.h
index 7bd840c84..6c42351ca 100644
--- a/src/inputStream_file.h
+++ b/src/inputStream_file.h
@@ -21,7 +21,7 @@
#include "inputStream.h"
-void inputStream_initFile();
+void inputStream_initFile(void);
int inputStream_fileOpen(InputStream * inStream, char *filename);
diff --git a/src/inputStream_http.h b/src/inputStream_http.h
index 61eee6d08..2ea63c621 100644
--- a/src/inputStream_http.h
+++ b/src/inputStream_http.h
@@ -21,7 +21,7 @@
#include "inputStream.h"
-void inputStream_initHttp();
+void inputStream_initHttp(void);
int inputStream_httpOpen(InputStream * inStream, char *filename);
diff --git a/src/interface.h b/src/interface.h
index b73a2453d..ac64c2b64 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -26,12 +26,12 @@
#include <sys/types.h>
#include <sys/socket.h>
-void initInterfaces();
+void initInterfaces(void);
void openAInterface(int fd, struct sockaddr *addr);
-void freeAllInterfaces();
-void closeOldInterfaces();
+void freeAllInterfaces(void);
+void closeOldInterfaces(void);
int interfacePrintWithFD(int fd, char *buffer, int len);
-int doIOForInterfaces();
+int doIOForInterfaces(void);
#endif
diff --git a/src/listen.h b/src/listen.h
index 36a9a9819..dd2c7dc7e 100644
--- a/src/listen.h
+++ b/src/listen.h
@@ -26,12 +26,12 @@
#include <unistd.h>
#include <sys/select.h>
-void listenOnPort();
+void listenOnPort(void);
void getConnections(fd_set * fds);
-void closeAllListenSockets();
-void freeAllListenSockets();
+void closeAllListenSockets(void);
+void freeAllListenSockets(void);
/* fdmax should be initialized to something */
void addListenSocketsToFdSet(fd_set * fds, int *fdmax);
diff --git a/src/log.h b/src/log.h
index e0adf80fa..ee9942133 100644
--- a/src/log.h
+++ b/src/log.h
@@ -46,6 +46,6 @@ int cycle_log_files(void);
void close_log_files(void);
-void flushWarningLog();
+void flushWarningLog(void);
#endif /* LOG_H */
diff --git a/src/ls.c b/src/ls.c
index 427d01b43..9a4c07eca 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -224,7 +224,7 @@ char *getSuffix(char *utf8file)
return ret;
}
-int hasSuffix(char *utf8file, char *suffix)
+static int hasSuffix(char *utf8file, char *suffix)
{
char *s = getSuffix(utf8file);
if (s && 0 == strcmp(s, suffix))
diff --git a/src/mp4ff/mp4ff.c b/src/mp4ff/mp4ff.c
index 07dc99f3f..e0bb781e8 100644
--- a/src/mp4ff/mp4ff.c
+++ b/src/mp4ff/mp4ff.c
@@ -31,6 +31,8 @@
#include "drms.h"
+int64_t mp4ff_get_track_duration_use_offsets(const mp4ff_t *f, const int32_t track);
+
mp4ff_t *mp4ff_open_read(mp4ff_callback_t *f)
{
mp4ff_t *ff = malloc(sizeof(mp4ff_t));
@@ -202,7 +204,7 @@ int32_t mp4ff_get_decoder_config(const mp4ff_t *f, const int32_t track,
return 0;
}
-int32_t mp4ff_get_track_type(const mp4ff_t *f, const int track)
+static int32_t mp4ff_get_track_type(const mp4ff_t *f, const int track)
{
return f->track[track]->type;
}
@@ -217,17 +219,17 @@ int32_t mp4ff_time_scale(const mp4ff_t *f, const int32_t track)
return f->track[track]->timeScale;
}
-uint32_t mp4ff_get_avg_bitrate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_avg_bitrate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->avgBitrate;
}
-uint32_t mp4ff_get_max_bitrate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_max_bitrate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->maxBitrate;
}
-int64_t mp4ff_get_track_duration(const mp4ff_t *f, const int32_t track)
+static int64_t mp4ff_get_track_duration(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->duration;
}
@@ -260,22 +262,22 @@ int32_t mp4ff_num_samples(const mp4ff_t *f, const int32_t track)
-uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track)
+static uint32_t mp4ff_get_sample_rate(const mp4ff_t *f, const int32_t track)
{
return f->track[track]->sampleRate;
}
-uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track)
+static uint32_t mp4ff_get_channel_count(const mp4ff_t * f,const int32_t track)
{
return f->track[track]->channelCount;
}
-uint32_t mp4ff_get_audio_type(const mp4ff_t * f,const int32_t track)
+static uint32_t mp4ff_get_audio_type(const mp4ff_t * f,const int32_t track)
{
return f->track[track]->audioType;
}
-int32_t mp4ff_get_sample_duration_use_offsets(const mp4ff_t *f, const int32_t track, const int32_t sample)
+static int32_t mp4ff_get_sample_duration_use_offsets(const mp4ff_t *f, const int32_t track, const int32_t sample)
{
int32_t d,o;
d = mp4ff_get_sample_duration(f,track,sample);
@@ -364,7 +366,7 @@ int32_t mp4ff_find_sample(const mp4ff_t *f, const int32_t track, const int64_t o
return (int32_t)(-1);
}
-int32_t mp4ff_find_sample_use_offsets(const mp4ff_t *f, const int32_t track, const int64_t offset,int32_t * toskip)
+static int32_t mp4ff_find_sample_use_offsets(const mp4ff_t *f, const int32_t track, const int64_t offset,int32_t * toskip)
{
return mp4ff_find_sample(f,track,offset + mp4ff_get_sample_offset(f,track,0),toskip);
}
@@ -402,7 +404,7 @@ int32_t mp4ff_read_sample(mp4ff_t *f, const int32_t track, const int32_t sample,
}
-int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsigned char *buffer)
+static int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsigned char *buffer)
{
int32_t result = 0;
int32_t size = mp4ff_audio_frame_size(f,track,sample);
@@ -420,7 +422,7 @@ int32_t mp4ff_read_sample_v2(mp4ff_t *f, const int track, const int sample,unsig
return result;
}
-int32_t mp4ff_read_sample_getsize(mp4ff_t *f, const int track, const int sample)
+static int32_t mp4ff_read_sample_getsize(mp4ff_t *f, const int track, const int sample)
{
int32_t temp = mp4ff_audio_frame_size(f, track, sample);
if (temp<0) temp = 0;
diff --git a/src/mp4ff/mp4tagupdate.c b/src/mp4ff/mp4tagupdate.c
index be2d7084b..c999fa5ee 100644
--- a/src/mp4ff/mp4tagupdate.c
+++ b/src/mp4ff/mp4tagupdate.c
@@ -43,7 +43,7 @@ typedef struct
unsigned error;
} membuffer;
-unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
+static unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
{
unsigned dest_size = buf->written + bytes;
@@ -75,64 +75,64 @@ unsigned membuffer_write(membuffer * buf,const void * ptr,unsigned bytes)
#define membuffer_write_data membuffer_write
-unsigned membuffer_write_int32(membuffer * buf,uint32_t data)
+static unsigned membuffer_write_int32(membuffer * buf,uint32_t data)
{
uint8_t temp[4] = {(uint8_t)(data>>24),(uint8_t)(data>>16),(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,4);
}
-unsigned membuffer_write_int24(membuffer * buf,uint32_t data)
+static unsigned membuffer_write_int24(membuffer * buf,uint32_t data)
{
uint8_t temp[3] = {(uint8_t)(data>>16),(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,3);
}
-unsigned membuffer_write_int16(membuffer * buf,uint16_t data)
+static unsigned membuffer_write_int16(membuffer * buf,uint16_t data)
{
uint8_t temp[2] = {(uint8_t)(data>>8),(uint8_t)data};
return membuffer_write_data(buf,temp,2);
}
-unsigned membuffer_write_atom_name(membuffer * buf,const char * data)
+static unsigned membuffer_write_atom_name(membuffer * buf,const char * data)
{
return membuffer_write_data(buf,data,4)==4 ? 1 : 0;
}
-void membuffer_write_atom(membuffer * buf,const char * name,unsigned size,const void * data)
+static void membuffer_write_atom(membuffer * buf,const char * name,unsigned size,const void * data)
{
membuffer_write_int32(buf,size + 8);
membuffer_write_atom_name(buf,name);
membuffer_write_data(buf,data,size);
}
-unsigned membuffer_write_string(membuffer * buf,const char * data)
+static unsigned membuffer_write_string(membuffer * buf,const char * data)
{
return membuffer_write_data(buf,data,strlen(data));
}
-unsigned membuffer_write_int8(membuffer * buf,uint8_t data)
+static unsigned membuffer_write_int8(membuffer * buf,uint8_t data)
{
return membuffer_write_data(buf,&data,1);
}
-void * membuffer_get_ptr(const membuffer * buf)
+static void * membuffer_get_ptr(const membuffer * buf)
{
return buf->data;
}
-unsigned membuffer_get_size(const membuffer * buf)
+static unsigned membuffer_get_size(const membuffer * buf)
{
return buf->written;
}
-unsigned membuffer_error(const membuffer * buf)
+static unsigned membuffer_error(const membuffer * buf)
{
return buf->error;
}
-void membuffer_set_error(membuffer * buf) {buf->error = 1;}
+static void membuffer_set_error(membuffer * buf) {buf->error = 1;}
-unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned bytes)
+static unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned bytes)
{
unsigned oldsize;
void * bufptr;
@@ -153,7 +153,7 @@ unsigned membuffer_transfer_from_file(membuffer * buf,mp4ff_t * src,unsigned byt
}
-membuffer * membuffer_create()
+static membuffer * membuffer_create()
{
const unsigned initial_size = 256;
@@ -166,13 +166,13 @@ membuffer * membuffer_create()
return buf;
}
-void membuffer_free(membuffer * buf)
+static void membuffer_free(membuffer * buf)
{
if (buf->data) free(buf->data);
free(buf);
}
-void * membuffer_detach(membuffer * buf)
+static void * membuffer_detach(membuffer * buf)
{
void * ret;
@@ -595,7 +595,7 @@ static uint32_t modify_moov(mp4ff_t * f,const mp4ff_metadata_t * data,void ** ou
}
-int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * data)
+static int32_t mp4ff_meta_update(mp4ff_callback_t *f,const mp4ff_metadata_t * data)
{
void * new_moov_data;
uint32_t new_moov_size;
diff --git a/src/normalize.h b/src/normalize.h
index 73e442882..5cba08aa5 100644
--- a/src/normalize.h
+++ b/src/normalize.h
@@ -23,9 +23,9 @@
extern int normalizationEnabled;
-void initNormalization();
+void initNormalization(void);
-void finishNormalization();
+void finishNormalization(void);
void normalizeData(char *buffer, int bufferSize, AudioFormat *format);
diff --git a/src/path.h b/src/path.h
index e9fd36fa0..63267b730 100644
--- a/src/path.h
+++ b/src/path.h
@@ -25,9 +25,9 @@
extern const char *musicDir;
-void initPaths();
+void initPaths(void);
-void finishPaths();
+void finishPaths(void);
/* utf8ToFsCharset() and fsCharsetToUtf8()
* Each returns a static pointer to a dynamically allocated buffer
@@ -44,7 +44,7 @@ char *fsCharsetToUtf8(char *str);
void setFsCharset(char *charset);
-char *getFsCharset();
+char *getFsCharset(void);
/* relative music path to absolute music path
* char * passed is a static variable, so don't free it
diff --git a/src/permission.h b/src/permission.h
index b34576f1a..a8fa8df3b 100644
--- a/src/permission.h
+++ b/src/permission.h
@@ -27,12 +27,13 @@
#define PERMISSION_CONTROL 4
#define PERMISSION_ADMIN 8
-void initPermissions();
int getPermissionFromPassword(char *password, int *permission);
-void finishPermissions();
+void finishPermissions(void);
-int getDefaultPermissions();
+int getDefaultPermissions(void);
+
+void initPermissions(void);
#endif
diff --git a/src/player.c b/src/player.c
index c24424c44..4f8066eed 100644
--- a/src/player.c
+++ b/src/player.c
@@ -60,7 +60,7 @@ static void resetPlayerMetadata(void)
}
}
-void resetPlayer(void)
+static void resetPlayer(void)
{
int pid;
diff --git a/src/player.h b/src/player.h
index e414c7c3d..691be0230 100644
--- a/src/player.h
+++ b/src/player.h
@@ -89,7 +89,7 @@ typedef struct _PlayerControl {
MetadataChunk fileMetadataChunk;
} PlayerControl;
-void clearPlayerPid();
+void clearPlayerPid(void);
void player_sigChldHandler(int pid, int status);
@@ -101,54 +101,54 @@ int playerPause(int fd);
int playerStop(int fd);
-void playerCloseAudio();
+void playerCloseAudio(void);
-void playerKill();
+void playerKill(void);
-int getPlayerTotalTime();
+int getPlayerTotalTime(void);
-int getPlayerElapsedTime();
+int getPlayerElapsedTime(void);
-unsigned long getPlayerBitRate();
+unsigned long getPlayerBitRate(void);
-int getPlayerState();
+int getPlayerState(void);
-void clearPlayerError();
+void clearPlayerError(void);
-char *getPlayerErrorStr();
+char *getPlayerErrorStr(void);
-int getPlayerError();
+int getPlayerError(void);
-int playerInit();
+int playerInit(void);
int queueSong(Song * song);
-int getPlayerQueueState();
+int getPlayerQueueState(void);
void setQueueState(int queueState);
-void playerQueueLock();
+void playerQueueLock(void);
-void playerQueueUnlock();
+void playerQueueUnlock(void);
int playerSeek(int fd, Song * song, float time);
void setPlayerCrossFade(float crossFadeInSeconds);
-float getPlayerCrossFade();
+float getPlayerCrossFade(void);
void setPlayerSoftwareVolume(int volume);
-double getPlayerTotalPlayTime();
+double getPlayerTotalPlayTime(void);
-unsigned int getPlayerSampleRate();
+unsigned int getPlayerSampleRate(void);
-int getPlayerBits();
+int getPlayerBits(void);
-int getPlayerChannels();
+int getPlayerChannels(void);
-void playerCycleLogFiles();
+void playerCycleLogFiles(void);
-Song *playerCurrentDecodeSong();
+Song *playerCurrentDecodeSong(void);
#endif
diff --git a/src/playerData.h b/src/playerData.h
index 00ba66d02..e7c87f0d6 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -40,10 +40,10 @@ typedef struct _PlayerData {
mpd_uint8 *audioDeviceStates;
} PlayerData;
-void initPlayerData();
+void initPlayerData(void);
-PlayerData *getPlayerData();
+PlayerData *getPlayerData(void);
-void freePlayerData();
+void freePlayerData(void);
#endif
diff --git a/src/playlist.c b/src/playlist.c
index 80c50f5b5..8671e6596 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -385,7 +385,7 @@ void readPlaylistState(FILE *fp)
}
}
-void printPlaylistSongInfo(int fd, int song)
+static void printPlaylistSongInfo(int fd, int song)
{
printSongInfo(fd, playlist.songs[song]);
fdprintf(fd, "Pos: %i\nId: %i\n", song, playlist.positionToId[song]);
@@ -472,7 +472,7 @@ int playlistId(int fd, int id)
return 0;
}
-void swapSongs(int song1, int song2)
+static void swapSongs(int song1, int song2)
{
Song *sTemp;
int iTemp;
@@ -492,7 +492,7 @@ void swapSongs(int song1, int song2)
playlist.positionToId[song2] = iTemp;
}
-void queueNextSongInPlaylist(void)
+static void queueNextSongInPlaylist(void)
{
if (playlist.current < playlist.length - 1) {
playlist.queued = playlist.current + 1;
@@ -522,7 +522,7 @@ void queueNextSongInPlaylist(void)
}
}
-void syncPlaylistWithQueue(int queue)
+static void syncPlaylistWithQueue(int queue)
{
if (queue && getPlayerQueueState() == PLAYER_QUEUE_BLANK) {
queueNextSongInPlaylist();
@@ -543,7 +543,7 @@ void syncPlaylistWithQueue(int queue)
}
}
-void lockPlaylistInteraction(void)
+static void lockPlaylistInteraction(void)
{
if (getPlayerQueueState() == PLAYER_QUEUE_PLAY ||
getPlayerQueueState() == PLAYER_QUEUE_FULL) {
@@ -557,7 +557,7 @@ static void unlockPlaylistInteraction(void)
playerQueueUnlock();
}
-void clearPlayerQueue(void)
+static void clearPlayerQueue(void)
{
playlist.queued = -1;
switch (getPlayerQueueState()) {
@@ -901,7 +901,7 @@ int playPlaylistById(int fd, int id, int stopOnError)
return playPlaylist(fd, playlist.idToPosition[id], stopOnError);
}
-void syncCurrentPlayerDecodeMetadata(void)
+static void syncCurrentPlayerDecodeMetadata(void)
{
Song *songPlayer = playerCurrentDecodeSong();
Song *song;
@@ -940,7 +940,7 @@ void syncPlayerAndPlaylist(void)
syncCurrentPlayerDecodeMetadata();
}
-int currentSongInPlaylist(int fd)
+static int currentSongInPlaylist(int fd)
{
if (playlist_state != PLAYLIST_STATE_PLAY)
return 0;
diff --git a/src/playlist.h b/src/playlist.h
index 837bff161..c5f291101 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -30,9 +30,9 @@
#define PLAYLIST_FILE_SUFFIX "m3u"
-void initPlaylist();
+void initPlaylist(void);
-void finishPlaylist();
+void finishPlaylist(void);
void readPlaylistState(FILE *);
@@ -62,7 +62,7 @@ int playPlaylistById(int fd, int song, int stopOnError);
int nextSongInPlaylist(int fd);
-void syncPlayerAndPlaylist();
+void syncPlayerAndPlaylist(void);
int previousSongInPlaylist(int fd);
@@ -86,29 +86,29 @@ int swapSongsInPlaylistById(int fd, int id1, int id2);
int loadPlaylist(int fd, char *utf8file);
-int getPlaylistRepeatStatus();
+int getPlaylistRepeatStatus(void);
int setPlaylistRepeatStatus(int fd, int status);
-int getPlaylistRandomStatus();
+int getPlaylistRandomStatus(void);
int setPlaylistRandomStatus(int fd, int status);
-int getPlaylistCurrentSong();
+int getPlaylistCurrentSong(void);
int getPlaylistSongId(int song);
-int getPlaylistLength();
+int getPlaylistLength(void);
-unsigned long getPlaylistVersion();
+unsigned long getPlaylistVersion(void);
-void playPlaylistIfPlayerStopped();
+void playPlaylistIfPlayerStopped(void);
int seekSongInPlaylist(int fd, int song, float time);
int seekSongInPlaylistById(int fd, int id, float time);
-void playlistVersionChange();
+void playlistVersionChange(void);
int playlistChanges(int fd, mpd_uint32 version);
diff --git a/src/replayGain.h b/src/replayGain.h
index 74c28c33f..219944f2c 100644
--- a/src/replayGain.h
+++ b/src/replayGain.h
@@ -38,11 +38,11 @@ typedef struct _ReplayGainInfo {
float scale;
} ReplayGainInfo;
-ReplayGainInfo *newReplayGainInfo();
+ReplayGainInfo *newReplayGainInfo(void);
void freeReplayGainInfo(ReplayGainInfo * info);
-void initReplayGainState();
+void initReplayGainState(void);
void doReplayGain(ReplayGainInfo * info, char *buffer, int bufferSize,
AudioFormat * format);
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index 15ca0829c..023081ed9 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -58,7 +58,7 @@ int handlePendingSignals(void)
return 0;
}
-void chldSigHandler(int signal)
+static void chldSigHandler(int signal)
{
int status;
int pid;
diff --git a/src/sig_handlers.h b/src/sig_handlers.h
index c58696d0d..baf0240ba 100644
--- a/src/sig_handlers.h
+++ b/src/sig_handlers.h
@@ -21,22 +21,22 @@
#include "../config.h"
-int handlePendingSignals();
+int handlePendingSignals(void);
-void initSigHandlers();
+void initSigHandlers(void);
-void finishSigHandlers();
+void finishSigHandlers(void);
-void setSigHandlersForDecoder();
+void setSigHandlersForDecoder(void);
-void ignoreSignals();
+void ignoreSignals(void);
-void blockSignals();
+void blockSignals(void);
-void unblockSignals();
+void unblockSignals(void);
-void blockTermSignal();
+void blockTermSignal(void);
-void unblockTermSignal();
+void unblockTermSignal(void);
#endif
diff --git a/src/song.h b/src/song.h
index d4fde5470..c803b9695 100644
--- a/src/song.h
+++ b/src/song.h
@@ -43,7 +43,7 @@ typedef struct _Song {
typedef List SongList;
-Song *newNullSong();
+Song *newNullSong(void);
Song *newSong(char *url, int songType, struct _Directory *parentDir);
@@ -51,7 +51,7 @@ void freeSong(Song *);
void freeJustSong(Song *);
-SongList *newSongList();
+SongList *newSongList(void);
void freeSongList(SongList * list);
diff --git a/src/stats.h b/src/stats.h
index 4302732ce..b1a9568f5 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -33,7 +33,7 @@ typedef struct _Stats {
extern Stats stats;
-void initStats();
+void initStats(void);
int printStats(int fd);
diff --git a/src/tag.h b/src/tag.h
index d1fa4cef4..5bff80417 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -65,9 +65,9 @@ MpdTag *apeDup(char *file);
MpdTag *id3Dup(char *file);
-MpdTag *newMpdTag();
+MpdTag *newMpdTag(void);
-void initTagConfig();
+void initTagConfig(void);
void clearItemsFromMpdTag(MpdTag * tag, int itemType);
diff --git a/src/tree.c b/src/tree.c
index 96ad36b5f..d624daadc 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -350,8 +350,7 @@ _MergeNodes(TreeNode * lessNode, TreeNode * moreNode)
free(moreNode);
}
-void
-_DeleteAt(TreeIterator * iter)
+static void _DeleteAt(TreeIterator * iter)
{
TreeNode * node = iter->node;
int pos = iter->which - 1;
diff --git a/src/utils.h b/src/utils.h
index 02f70e946..d39c8e283 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -39,7 +39,7 @@ void stripReturnChar(char *string);
void my_usleep(long usec);
-int ipv6Supported();
+int ipv6Supported(void);
char *appendToString(char *dest, const char *src);
diff --git a/src/volume.h b/src/volume.h
index 8c4d3803e..5a1b33b63 100644
--- a/src/volume.h
+++ b/src/volume.h
@@ -27,13 +27,13 @@
#define VOLUME_MIXER_ALSA "alsa"
#define VOLUME_MIXER_SOFTWARE "software"
-void initVolume();
+void initVolume(void);
-void openVolumeDevice();
+void openVolumeDevice(void);
-void finishVolume();
+void finishVolume(void);
-int getVolumeLevel();
+int getVolumeLevel(void);
int changeVolumeLevel(int fd, int change, int rel);