aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audioOutputs/audioOutput_ao.c2
-rw-r--r--src/audioOutputs/audioOutput_jack.c4
-rw-r--r--src/audioOutputs/audioOutput_null.c5
-rw-r--r--src/audioOutputs/audioOutput_oss.c3
-rw-r--r--src/command.c198
-rw-r--r--src/dbUtils.c22
-rw-r--r--src/inputPlugins/_flac_common.c2
-rw-r--r--src/inputPlugins/flac_plugin.c14
-rw-r--r--src/inputPlugins/oggvorbis_plugin.c2
-rw-r--r--src/inputPlugins/wavpack_plugin.c3
-rw-r--r--src/inputStream_file.c2
-rw-r--r--src/inputStream_http.c2
-rw-r--r--src/main.c4
-rw-r--r--src/pcm_utils.c6
-rw-r--r--src/player.c4
-rw-r--r--src/playlist.c2
-rw-r--r--src/sig_handlers.c2
-rw-r--r--src/tree.c14
-rw-r--r--src/volume.c2
-rw-r--r--src/zeroconf.c9
20 files changed, 184 insertions, 118 deletions
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index 65ffa2c27..e7e201add 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -158,7 +158,7 @@ static void audioOutputAo_finishDriver(AudioOutput * audioOutput)
ao_shutdown();
}
-static void audioOutputAo_dropBufferedAudio(AudioOutput * audioOutput)
+static void audioOutputAo_dropBufferedAudio(mpd_unused AudioOutput * audioOutput)
{
/* not supported by libao */
}
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c
index ed0bceb46..c8aa4dcb6 100644
--- a/src/audioOutputs/audioOutput_jack.c
+++ b/src/audioOutputs/audioOutput_jack.c
@@ -102,7 +102,7 @@ static void jack_finishDriver(AudioOutput *audioOutput)
freeJackData(audioOutput);
}
-static int srate(jack_nframes_t rate, void *data)
+static int srate(mpd_unused jack_nframes_t rate, void *data)
{
JackData *jd = (JackData *) ((AudioOutput*) data)->data;
AudioFormat *audioFormat = &(((AudioOutput*) data)->outAudioFormat);
@@ -366,7 +366,7 @@ static void jack_closeDevice(AudioOutput * audioOutput)
DEBUG("jack_closeDevice (pid=%d)\n", getpid());
}
-static void jack_dropBufferedAudio (AudioOutput * audioOutput)
+static void jack_dropBufferedAudio (mpd_unused AudioOutput * audioOutput)
{
}
diff --git a/src/audioOutputs/audioOutput_null.c b/src/audioOutputs/audioOutput_null.c
index 37ff7194a..d63004645 100644
--- a/src/audioOutputs/audioOutput_null.c
+++ b/src/audioOutputs/audioOutput_null.c
@@ -19,7 +19,8 @@
#include "../audioOutput.h"
#include "../timer.h"
-static int null_initDriver(AudioOutput *audioOutput, ConfigParam *param)
+static int null_initDriver(AudioOutput *audioOutput,
+ mpd_unused ConfigParam *param)
{
audioOutput->data = NULL;
return 0;
@@ -43,7 +44,7 @@ static void null_closeDevice(AudioOutput *audioOutput)
}
static int null_playAudio(AudioOutput *audioOutput,
- const char *playChunk, size_t size)
+ mpd_unused const char *playChunk, size_t size)
{
Timer *timer = audioOutput->data;
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index 2a6a4876b..2df7d5728 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -334,7 +334,8 @@ static int oss_testDefault(void)
return -1;
}
-static int oss_open_default(AudioOutput *ao, ConfigParam *param, OssData *od)
+static int oss_open_default(mpd_unused AudioOutput *ao, ConfigParam *param,
+ OssData *od)
{
int i;
int err[ARRAY_SIZE(default_devices)];
diff --git a/src/command.c b/src/command.c
index a7e5b38fd..3ea46dfd4 100644
--- a/src/command.c
+++ b/src/command.c
@@ -233,18 +233,21 @@ static void addCommand(const char *name,
insertInList(commandList, cmd->cmd, cmd);
}
-static int handleUrlHandlers(int fd, int *permission, int argc, char *argv[])
+static int handleUrlHandlers(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return printRemoteUrlHandlers(fd);
}
-static int handleTagTypes(int fd, int *permission, int argc, char *argv[])
+static int handleTagTypes(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
printTagTypes(fd);
return 0;
}
-static int handlePlay(int fd, int *permission, int argc, char *argv[])
+static int handlePlay(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int song = -1;
@@ -253,7 +256,8 @@ static int handlePlay(int fd, int *permission, int argc, char *argv[])
return playPlaylist(fd, song, 0);
}
-static int handlePlayId(int fd, int *permission, int argc, char *argv[])
+static int handlePlayId(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int id = -1;
@@ -263,12 +267,14 @@ static int handlePlayId(int fd, int *permission, int argc, char *argv[])
return playPlaylistById(fd, id, 0);
}
-static int handleStop(int fd, int *permission, int argc, char *argv[])
+static int handleStop(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return stopPlaylist(fd);
}
-static int handleCurrentSong(int fd, int *permission, int argc, char *argv[])
+static int handleCurrentSong(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
int song = getPlaylistCurrentSong();
@@ -278,7 +284,8 @@ static int handleCurrentSong(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handlePause(int fd, int *permission, int argc, char *argv[])
+static int handlePause(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
if (argc == 2) {
int pause_flag;
@@ -289,7 +296,8 @@ static int handlePause(int fd, int *permission, int argc, char *argv[])
return playerPause(fd);
}
-static int commandStatus(int fd, int *permission, int argc, char *argv[])
+static int commandStatus(mpd_unused int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
const char *state = NULL;
int updateJobId;
@@ -351,17 +359,20 @@ static int commandStatus(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handleKill(int fd, int *permission, int argc, char *argv[])
+static int handleKill(mpd_unused int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return COMMAND_RETURN_KILL;
}
-static int handleClose(int fd, int *permission, int argc, char *argv[])
+static int handleClose(mpd_unused int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return COMMAND_RETURN_CLOSE;
}
-static int handleAdd(int fd, int *permission, int argc, char *argv[])
+static int handleAdd(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
char *path = argv[1];
@@ -371,7 +382,8 @@ static int handleAdd(int fd, int *permission, int argc, char *argv[])
return addAllIn(fd, path);
}
-static int handleAddId(int fd, int *permission, int argc, char *argv[])
+static int handleAddId(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int added_id;
int ret = addToPlaylist(fd, argv[1], &added_id);
@@ -393,7 +405,8 @@ static int handleAddId(int fd, int *permission, int argc, char *argv[])
return ret;
}
-static int handleDelete(int fd, int *permission, int argc, char *argv[])
+static int handleDelete(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int song;
@@ -402,7 +415,8 @@ static int handleDelete(int fd, int *permission, int argc, char *argv[])
return deleteFromPlaylist(fd, song);
}
-static int handleDeleteId(int fd, int *permission, int argc, char *argv[])
+static int handleDeleteId(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int id;
@@ -411,43 +425,50 @@ static int handleDeleteId(int fd, int *permission, int argc, char *argv[])
return deleteFromPlaylistById(fd, id);
}
-static int handlePlaylist(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylist(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return showPlaylist(fd);
}
-static int handleShuffle(int fd, int *permission, int argc, char *argv[])
+static int handleShuffle(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return shufflePlaylist(fd);
}
-static int handleClear(int fd, int *permission, int argc, char *argv[])
+static int handleClear(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return clearPlaylist(fd);
}
-static int handleSave(int fd, int *permission, int argc, char *argv[])
+static int handleSave(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return savePlaylist(fd, argv[1]);
}
-static int handleLoad(int fd, int *permission, int argc, char *argv[])
+static int handleLoad(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return loadPlaylist(fd, argv[1]);
}
-static int handleListPlaylist(int fd, int *permission, int argc, char *argv[])
+static int handleListPlaylist(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return PlaylistInfo(fd, argv[1], 0);
}
-static int handleListPlaylistInfo(int fd, int *permission,
- int argc, char *argv[])
+static int handleListPlaylistInfo(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return PlaylistInfo(fd, argv[1], 1);
}
-static int handleLsInfo(int fd, int *permission, int argc, char *argv[])
+static int handleLsInfo(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
const char *path = "";
@@ -463,18 +484,20 @@ static int handleLsInfo(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handleRm(int fd, int *permission, int argc, char *argv[])
+static int handleRm(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return deletePlaylist(fd, argv[1]);
}
-static int handleRename(int fd, int *permission, int argc, char *argv[])
+static int handleRename(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return renameStoredPlaylist(fd, argv[1], argv[2]);
}
-static int handlePlaylistChanges(int fd, int *permission,
- int argc, char *argv[])
+static int handlePlaylistChanges(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
mpd_uint32 version;
@@ -483,8 +506,8 @@ static int handlePlaylistChanges(int fd, int *permission,
return playlistChanges(fd, version);
}
-static int handlePlaylistChangesPosId(int fd, int *permission,
- int argc, char *argv[])
+static int handlePlaylistChangesPosId(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
mpd_uint32 version;
@@ -493,7 +516,8 @@ static int handlePlaylistChangesPosId(int fd, int *permission,
return playlistChangesPosId(fd, version);
}
-static int handlePlaylistInfo(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistInfo(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int song = -1;
@@ -502,7 +526,8 @@ static int handlePlaylistInfo(int fd, int *permission, int argc, char *argv[])
return playlistInfo(fd, song);
}
-static int handlePlaylistId(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistId(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int id = -1;
@@ -511,7 +536,8 @@ static int handlePlaylistId(int fd, int *permission, int argc, char *argv[])
return playlistId(fd, id);
}
-static int handleFind(int fd, int *permission, int argc, char *argv[])
+static int handleFind(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int ret;
@@ -532,7 +558,8 @@ static int handleFind(int fd, int *permission, int argc, char *argv[])
return ret;
}
-static int handleSearch(int fd, int *permission, int argc, char *argv[])
+static int handleSearch(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int ret;
@@ -553,7 +580,8 @@ static int handleSearch(int fd, int *permission, int argc, char *argv[])
return ret;
}
-static int handleCount(int fd, int *permission, int argc, char *argv[])
+static int handleCount(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int ret;
@@ -574,7 +602,8 @@ static int handleCount(int fd, int *permission, int argc, char *argv[])
return ret;
}
-static int handlePlaylistFind(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistFind(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
LocateTagItem *items;
int numItems = newLocateTagItemArrayFromArgArray(argv + 1,
@@ -593,7 +622,8 @@ static int handlePlaylistFind(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handlePlaylistSearch(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistSearch(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
LocateTagItem *items;
int numItems = newLocateTagItemArrayFromArgArray(argv + 1,
@@ -612,7 +642,8 @@ static int handlePlaylistSearch(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handlePlaylistDelete(int fd, int *permission, int argc, char *argv[]) {
+static int handlePlaylistDelete(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[]) {
char *playlist = argv[1];
int from;
@@ -622,7 +653,8 @@ static int handlePlaylistDelete(int fd, int *permission, int argc, char *argv[])
return removeOneSongFromStoredPlaylistByPath(fd, playlist, from);
}
-static int handlePlaylistMove(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistMove(int fd, mpd_unused int *permission,
+ mpd_unused mpd_unused int argc, char *argv[])
{
char *playlist = argv[1];
int from, to;
@@ -636,8 +668,8 @@ static int handlePlaylistMove(int fd, int *permission, int argc, char *argv[])
}
static int listHandleUpdate(int fd,
- int *permission,
- int argc,
+ mpd_unused int *permission,
+ mpd_unused int argc,
char *argv[],
struct strnode *cmdnode, CommandEntry * cmd)
{
@@ -666,7 +698,8 @@ static int listHandleUpdate(int fd,
return 0;
}
-static int handleUpdate(int fd, int *permission, int argc, char *argv[])
+static int handleUpdate(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
if (argc == 2) {
int ret;
@@ -679,17 +712,20 @@ static int handleUpdate(int fd, int *permission, int argc, char *argv[])
return updateInit(fd, NULL);
}
-static int handleNext(int fd, int *permission, int argc, char *argv[])
+static int handleNext(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return nextSongInPlaylist(fd);
}
-static int handlePrevious(int fd, int *permission, int argc, char *argv[])
+static int handlePrevious(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return previousSongInPlaylist(fd);
}
-static int handleListAll(int fd, int *permission, int argc, char *argv[])
+static int handleListAll(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
char *directory = NULL;
@@ -698,7 +734,8 @@ static int handleListAll(int fd, int *permission, int argc, char *argv[])
return printAllIn(fd, directory);
}
-static int handleVolume(int fd, int *permission, int argc, char *argv[])
+static int handleVolume(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int change;
@@ -707,7 +744,8 @@ static int handleVolume(int fd, int *permission, int argc, char *argv[])
return changeVolumeLevel(fd, change, 1);
}
-static int handleSetVol(int fd, int *permission, int argc, char *argv[])
+static int handleSetVol(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int level;
@@ -716,7 +754,8 @@ static int handleSetVol(int fd, int *permission, int argc, char *argv[])
return changeVolumeLevel(fd, level, 0);
}
-static int handleRepeat(int fd, int *permission, int argc, char *argv[])
+static int handleRepeat(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int status;
@@ -725,7 +764,8 @@ static int handleRepeat(int fd, int *permission, int argc, char *argv[])
return setPlaylistRepeatStatus(fd, status);
}
-static int handleRandom(int fd, int *permission, int argc, char *argv[])
+static int handleRandom(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int status;
@@ -734,18 +774,21 @@ static int handleRandom(int fd, int *permission, int argc, char *argv[])
return setPlaylistRandomStatus(fd, status);
}
-static int handleStats(int fd, int *permission, int argc, char *argv[])
+static int handleStats(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return printStats(fd);
}
-static int handleClearError(int fd, int *permission, int argc, char *argv[])
+static int handleClearError(mpd_unused int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
clearPlayerError();
return 0;
}
-static int handleList(int fd, int *permission, int argc, char *argv[])
+static int handleList(int fd, mpd_unused int *permission,
+ int argc, char *argv[])
{
int numConditionals;
LocateTagItem *conditionals = NULL;
@@ -794,7 +837,8 @@ static int handleList(int fd, int *permission, int argc, char *argv[])
return ret;
}
-static int handleMove(int fd, int *permission, int argc, char *argv[])
+static int handleMove(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int from, to;
@@ -805,7 +849,8 @@ static int handleMove(int fd, int *permission, int argc, char *argv[])
return moveSongInPlaylist(fd, from, to);
}
-static int handleMoveId(int fd, int *permission, int argc, char *argv[])
+static int handleMoveId(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int id, to;
@@ -816,7 +861,8 @@ static int handleMoveId(int fd, int *permission, int argc, char *argv[])
return moveSongInPlaylistById(fd, id, to);
}
-static int handleSwap(int fd, int *permission, int argc, char *argv[])
+static int handleSwap(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int song1, song2;
@@ -827,7 +873,8 @@ static int handleSwap(int fd, int *permission, int argc, char *argv[])
return swapSongsInPlaylist(fd, song1, song2);
}
-static int handleSwapId(int fd, int *permission, int argc, char *argv[])
+static int handleSwapId(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int id1, id2;
@@ -838,7 +885,8 @@ static int handleSwapId(int fd, int *permission, int argc, char *argv[])
return swapSongsInPlaylistById(fd, id1, id2);
}
-static int handleSeek(int fd, int *permission, int argc, char *argv[])
+static int handleSeek(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int song, seek_time;
@@ -849,7 +897,8 @@ static int handleSeek(int fd, int *permission, int argc, char *argv[])
return seekSongInPlaylist(fd, song, seek_time);
}
-static int handleSeekId(int fd, int *permission, int argc, char *argv[])
+static int handleSeekId(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int id, seek_time;
@@ -860,7 +909,8 @@ static int handleSeekId(int fd, int *permission, int argc, char *argv[])
return seekSongInPlaylistById(fd, id, seek_time);
}
-static int handleListAllInfo(int fd, int *permission, int argc, char *argv[])
+static int handleListAllInfo(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
char *directory = NULL;
@@ -869,12 +919,14 @@ static int handleListAllInfo(int fd, int *permission, int argc, char *argv[])
return printInfoForAllIn(fd, directory);
}
-static int handlePing(int fd, int *permission, int argc, char *argv[])
+static int handlePing(mpd_unused int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
return 0;
}
-static int handlePassword(int fd, int *permission, int argc, char *argv[])
+static int handlePassword(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
if (getPermissionFromPassword(argv[1], permission) < 0) {
commandError(fd, ACK_ERROR_PASSWORD, "incorrect password");
@@ -884,7 +936,8 @@ static int handlePassword(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handleCrossfade(int fd, int *permission, int argc, char *argv[])
+static int handleCrossfade(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int xfade_time;
@@ -895,7 +948,8 @@ static int handleCrossfade(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handleEnableDevice(int fd, int *permission, int argc, char *argv[])
+static int handleEnableDevice(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int device;
@@ -904,7 +958,8 @@ static int handleEnableDevice(int fd, int *permission, int argc, char *argv[])
return enableAudioDevice(fd, device);
}
-static int handleDisableDevice(int fd, int *permission, int argc, char *argv[])
+static int handleDisableDevice(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
int device;
@@ -913,7 +968,8 @@ static int handleDisableDevice(int fd, int *permission, int argc, char *argv[])
return disableAudioDevice(fd, device);
}
-static int handleDevices(int fd, int *permission, int argc, char *argv[])
+static int handleDevices(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
printAudioDevices(fd);
@@ -921,7 +977,8 @@ static int handleDevices(int fd, int *permission, int argc, char *argv[])
}
/* don't be fooled, this is the command handler for "commands" command */
-static int handleCommands(int fd, int *permission, int argc, char *argv[])
+static int handleCommands(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
ListNode *node = commandList->firstNode;
CommandEntry *cmd;
@@ -938,7 +995,8 @@ static int handleCommands(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handleNotcommands(int fd, int *permission, int argc, char *argv[])
+static int handleNotcommands(int fd, mpd_unused int *permission,
+ mpd_unused int argc, mpd_unused char *argv[])
{
ListNode *node = commandList->firstNode;
CommandEntry *cmd;
@@ -956,12 +1014,14 @@ static int handleNotcommands(int fd, int *permission, int argc, char *argv[])
return 0;
}
-static int handlePlaylistClear(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistClear(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
return clearStoredPlaylist(fd, argv[1]);
}
-static int handlePlaylistAdd(int fd, int *permission, int argc, char *argv[])
+static int handlePlaylistAdd(int fd, mpd_unused int *permission,
+ mpd_unused int argc, char *argv[])
{
char *playlist = argv[1];
char *path = argv[2];
@@ -1135,7 +1195,7 @@ static CommandEntry *getCommandEntryFromString(char *string, int *permission)
return cmd;
}
-static int processCommandInternal(int fd, int *permission,
+static int processCommandInternal(int fd, mpd_unused int *permission,
char *commandString, struct strnode *cmdnode)
{
int argc;
diff --git a/src/dbUtils.c b/src/dbUtils.c
index 11f724b21..5d070e588 100644
--- a/src/dbUtils.c
+++ b/src/dbUtils.c
@@ -45,7 +45,8 @@ typedef struct _SearchStats {
unsigned long playTime;
} SearchStats;
-static int countSongsInDirectory(int fd, Directory * directory, void *data)
+static int countSongsInDirectory(mpd_unused int fd, Directory * directory,
+ void *data)
{
int *count = (int *)data;
@@ -55,7 +56,7 @@ static int countSongsInDirectory(int fd, Directory * directory, void *data)
}
static int printDirectoryInDirectory(int fd, Directory * directory,
- void *data)
+ mpd_unused void *data)
{
if (directory->path) {
fdprintf(fd, "directory: %s\n", getDirectoryPath(directory));
@@ -63,7 +64,7 @@ static int printDirectoryInDirectory(int fd, Directory * directory,
return 0;
}
-static int printSongInDirectory(int fd, Song * song, void *data)
+static int printSongInDirectory(int fd, Song * song, mpd_unused void *data)
{
printSongUrl(fd, song);
return 0;
@@ -133,7 +134,7 @@ static void printSearchStats(int fd, SearchStats *stats)
fdprintf(fd, "playtime: %li\n", stats->playTime);
}
-static int searchStatsInDirectory(int fd, Song * song, void *data)
+static int searchStatsInDirectory(mpd_unused int fd, Song * song, void *data)
{
SearchStats *stats = data;
@@ -171,7 +172,8 @@ int printAllIn(int fd, char *name)
printDirectoryInDirectory, NULL);
}
-static int directoryAddSongToPlaylist(int fd, Song * song, void *data)
+static int directoryAddSongToPlaylist(int fd, Song * song,
+ mpd_unused void *data)
{
return addSongToPlaylist(fd, song, NULL);
}
@@ -194,12 +196,12 @@ int addAllInToStoredPlaylist(int fd, char *name, char *utf8file)
(void *)utf8file);
}
-static int directoryPrintSongInfo(int fd, Song * song, void *data)
+static int directoryPrintSongInfo(int fd, Song * song, mpd_unused void *data)
{
return printSongInfo(fd, song);
}
-static int sumSongTime(int fd, Song * song, void *data)
+static int sumSongTime(mpd_unused int fd, Song * song, void *data)
{
unsigned long *sum_time = (unsigned long *)data;
@@ -307,7 +309,8 @@ int listAllUniqueTags(int fd, int type, int numConditionals,
return ret;
}
-static int sumSavedFilenameMemoryInDirectory(int fd, Directory * dir,
+static int sumSavedFilenameMemoryInDirectory(mpd_unused int fd,
+ Directory * dir,
void *data)
{
int *sum = data;
@@ -321,7 +324,8 @@ static int sumSavedFilenameMemoryInDirectory(int fd, Directory * dir,
return 0;
}
-static int sumSavedFilenameMemoryInSong(int fd, Song * song, void *data)
+static int sumSavedFilenameMemoryInSong(mpd_unused int fd, Song * song,
+ void *data)
{
int *sum = data;
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index cf23a5e8c..92c3fe716 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -181,7 +181,7 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
void flac_error_common_cb(const char *plugin,
const FLAC__StreamDecoderErrorStatus status,
- FlacData * data)
+ mpd_unused FlacData * data)
{
if (dc.stop)
return;
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 38131bac9..a957e5107 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -31,7 +31,7 @@
/* this code was based on flac123, from flac-tools */
-static flac_read_status flacRead(const flac_decoder * flacDec,
+static flac_read_status flacRead(mpd_unused const flac_decoder * flacDec,
FLAC__byte buf[],
flac_read_status_size_t *bytes,
void *fdata)
@@ -57,7 +57,7 @@ static flac_read_status flacRead(const flac_decoder * flacDec,
return flac_read_status_continue;
}
-static flac_seek_status flacSeek(const flac_decoder * flacDec,
+static flac_seek_status flacSeek(mpd_unused const flac_decoder * flacDec,
FLAC__uint64 offset,
void *fdata)
{
@@ -70,7 +70,7 @@ static flac_seek_status flacSeek(const flac_decoder * flacDec,
return flac_seek_status_ok;
}
-static flac_tell_status flacTell(const flac_decoder * flacDec,
+static flac_tell_status flacTell(mpd_unused const flac_decoder * flacDec,
FLAC__uint64 * offset,
void *fdata)
{
@@ -81,7 +81,7 @@ static flac_tell_status flacTell(const flac_decoder * flacDec,
return flac_tell_status_ok;
}
-static flac_length_status flacLength(const flac_decoder * flacDec,
+static flac_length_status flacLength(mpd_unused const flac_decoder * flacDec,
FLAC__uint64 * length,
void *fdata)
{
@@ -92,7 +92,7 @@ static flac_length_status flacLength(const flac_decoder * flacDec,
return flac_length_status_ok;
}
-static FLAC__bool flacEOF(const flac_decoder * flacDec, void *fdata)
+static FLAC__bool flacEOF(mpd_unused const flac_decoder * flacDec, void *fdata)
{
FlacData *data = (FlacData *) fdata;
@@ -101,7 +101,7 @@ static FLAC__bool flacEOF(const flac_decoder * flacDec, void *fdata)
return false;
}
-static void flacError(const flac_decoder *dec,
+static void flacError(mpd_unused const flac_decoder *dec,
FLAC__StreamDecoderErrorStatus status, void *fdata)
{
flac_error_common_cb("flac", status, (FlacData *) fdata);
@@ -199,7 +199,7 @@ static void flacPrintErroredState(FLAC__StreamDecoderState state)
}
#endif /* FLAC_API_VERSION_CURRENT >= 7 */
-static void flacMetadata(const flac_decoder * dec,
+static void flacMetadata(mpd_unused const flac_decoder * dec,
const FLAC__StreamMetadata * block, void *vdata)
{
flac_metadata_common_cb(block, (FlacData *) vdata);
diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c
index 16040b388..359198b17 100644
--- a/src/inputPlugins/oggvorbis_plugin.c
+++ b/src/inputPlugins/oggvorbis_plugin.c
@@ -86,7 +86,7 @@ static int ogg_seek_cb(void *vdata, ogg_int64_t offset, int whence)
}
/* TODO: check Ogg libraries API and see if we can just not have this func */
-static int ogg_close_cb(void *vdata)
+static int ogg_close_cb(mpd_unused void *vdata)
{
return 0;
}
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 7a7145141..ef7c59b8e 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -114,7 +114,8 @@ static void format_samples_int(int Bps, void *buffer, uint32_t samcnt)
/*
* This function converts floating point sample data to 16 bit integer.
*/
-static void format_samples_float(int Bps, void *buffer, uint32_t samcnt)
+static void format_samples_float(mpd_unused int Bps, void *buffer,
+ uint32_t samcnt)
{
int16_t *dst = (int16_t *)buffer;
float *src = (float *)buffer;
diff --git a/src/inputStream_file.c b/src/inputStream_file.c
index fb433d380..2e51e3f6c 100644
--- a/src/inputStream_file.c
+++ b/src/inputStream_file.c
@@ -106,7 +106,7 @@ int inputStream_fileAtEOF(InputStream * inStream)
return 0;
}
-int inputStream_fileBuffer(InputStream * inStream)
+int inputStream_fileBuffer(mpd_unused InputStream * inStream)
{
return 0;
}
diff --git a/src/inputStream_http.c b/src/inputStream_http.c
index 9de4314a6..3e99b0475 100644
--- a/src/inputStream_http.c
+++ b/src/inputStream_http.c
@@ -750,7 +750,7 @@ closed:
return NULL;
}
-int inputStream_httpBuffer(InputStream *is)
+int inputStream_httpBuffer(mpd_unused InputStream *is)
{
return 0;
}
diff --git a/src/main.c b/src/main.c
index a838d0349..4b989163e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -352,7 +352,7 @@ static void cleanUpPidFile(void)
unlink(pidFileParam->value);
}
-static void killFromPidFile(char *cmd, int killOption)
+static void killFromPidFile(void)
{
FILE *fp;
ConfigParam *pidFileParam = parseConfigFilePath(CONF_PID_FILE, 0);
@@ -391,7 +391,7 @@ int main(int argc, char *argv[])
parseOptions(argc, argv, &options);
if (options.kill)
- killFromPidFile(argv[0], options.kill);
+ killFromPidFile();
initStats();
initTagConfig();
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index 3cf57def1..f716c279d 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -258,9 +258,11 @@ static size_t pcm_convertSampleRate(mpd_sint8 channels, mpd_uint32 inSampleRate,
#else /* !HAVE_LIBSAMPLERATE */
/* resampling code blatantly ripped from ESD */
static size_t pcm_convertSampleRate(mpd_sint8 channels, mpd_uint32 inSampleRate,
- const char *inBuffer, size_t inSize,
+ const char *inBuffer,
+ mpd_unused size_t inSize,
mpd_uint32 outSampleRate, char *outBuffer,
- size_t outSize, ConvState *convState)
+ size_t outSize,
+ mpd_unused ConvState *convState)
{
mpd_uint32 rd_dat = 0;
mpd_uint32 wr_dat = 0;
diff --git a/src/player.c b/src/player.c
index 4d7762a0f..e474b47dd 100644
--- a/src/player.c
+++ b/src/player.c
@@ -126,7 +126,7 @@ int playerPlay(int fd, Song * song)
return 0;
}
-int playerStop(int fd)
+int playerStop(mpd_unused int fd)
{
if (pc.state != PLAYER_STATE_STOP) {
pc.stop = 1;
@@ -144,7 +144,7 @@ void playerKill(void) /* deprecated */
playerPause(STDERR_FILENO);
}
-int playerPause(int fd)
+int playerPause(mpd_unused int fd)
{
if (pc.state != PLAYER_STATE_STOP) {
pc.pause = 1;
diff --git a/src/playlist.c b/src/playlist.c
index ce029cc65..f878de643 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1258,7 +1258,7 @@ int previousSongInPlaylist(int fd)
}
}
-int shufflePlaylist(int fd)
+int shufflePlaylist(mpd_unused int fd)
{
int i;
int ri;
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index 88159f24f..0a0ad6b1e 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -47,7 +47,7 @@ int handlePendingSignals(void)
return 0;
}
-static void chldSigHandler(int sig)
+static void chldSigHandler(mpd_unused int sig)
{
int status;
int pid;
diff --git a/src/tree.c b/src/tree.c
index 4b212cca6..8b577c853 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -171,8 +171,7 @@ _SplitNode(TreeNode * node)
static
void
-_InsertNodeAndData(Tree * tree,
- TreeNode * node,
+_InsertNodeAndData(TreeNode * node,
int pos,
TreeNode * newNode,
TreeKeyData keyData)
@@ -204,8 +203,7 @@ _InsertNodeAndData(Tree * tree,
static
TreeKeyData
-_AddDataToSplitNodes(Tree * tree,
- TreeNode * lessNode,
+_AddDataToSplitNodes(TreeNode * lessNode,
TreeNode * moreNode,
int pos,
TreeNode * newNode,
@@ -217,7 +215,7 @@ _AddDataToSplitNodes(Tree * tree,
if (pos <= lessNode->count)
{
- _InsertNodeAndData(tree, lessNode, pos, newNode, keyData);
+ _InsertNodeAndData(lessNode, pos, newNode, keyData);
lessNode->count--;
retKeyData = lessNode->keyData[lessNode->count];
_ClearKeyData(&(lessNode->keyData[lessNode->count]));
@@ -277,8 +275,7 @@ _InsertAt(TreeIterator * iter, TreeKeyData keyData)
TreeNode * newNode = _SplitNode(node);
/* insert data in split nodes */
- keyData = _AddDataToSplitNodes(iter->tree,
- node,
+ keyData = _AddDataToSplitNodes(node,
newNode,
pos,
insertNode,
@@ -306,8 +303,7 @@ _InsertAt(TreeIterator * iter, TreeKeyData keyData)
else
{
/* insert the data and newNode */
- _InsertNodeAndData(iter->tree,
- node,
+ _InsertNodeAndData(node,
pos,
insertNode,
keyData);
diff --git a/src/volume.c b/src/volume.c
index 5b720651a..903e4717a 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -469,7 +469,7 @@ int getVolumeLevel(void)
}
}
-static int changeSoftwareVolume(int fd, int change, int rel)
+static int changeSoftwareVolume(mpd_unused int fd, int change, int rel)
{
int new = change;
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 421a037b8..e6cbb4287 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -94,7 +94,7 @@ struct AvahiTimeout {
static AvahiWatch *avahiWatchList;
static AvahiTimeout *avahiTimeoutList;
-static AvahiWatch *avahiWatchNew(const AvahiPoll * api, int fd,
+static AvahiWatch *avahiWatchNew(mpd_unused const AvahiPoll * api, int fd,
AvahiWatchEvent event,
AvahiWatchCallback callback, void *userdata)
{
@@ -177,7 +177,7 @@ static void avahiTimeoutFree(AvahiTimeout * t)
free(t);
}
-static AvahiTimeout *avahiTimeoutNew(const AvahiPoll * api,
+static AvahiTimeout *avahiTimeoutNew(mpd_unused const AvahiPoll * api,
const struct timeval *tv,
AvahiTimeoutCallback callback,
void *userdata)
@@ -201,7 +201,8 @@ static AvahiTimeout *avahiTimeoutNew(const AvahiPoll * api,
/* Callback when the EntryGroup changes state */
static void avahiGroupCallback(AvahiEntryGroup * g,
- AvahiEntryGroupState state, void *userdata)
+ AvahiEntryGroupState state,
+ mpd_unused void *userdata)
{
char *n;
assert(g);
@@ -291,7 +292,7 @@ fail:
/* Callback when avahi changes state */
static void avahiClientCallback(AvahiClient * c, AvahiClientState state,
- void *userdata)
+ mpd_unused void *userdata)
{
int reason;
assert(c);