summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCody P Schafer <devel@codyps.com>2014-03-13 11:14:21 -0700
committerCody P Schafer <devel@codyps.com>2014-03-13 11:14:21 -0700
commitebfd7d45c6b8eb5b2a1ee6e97a3f21f5f5bf9b43 (patch)
treebd9dd4f6ebe82943d61818d130b3a3f6d48d44dd /src
parent3f77401a554c4db6b67c12732b7acaea7b229bbb (diff)
downloadpianobar-ebfd7d45c6b8eb5b2a1ee6e97a3f21f5f5bf9b43.tar.gz
pianobar-ebfd7d45c6b8eb5b2a1ee6e97a3f21f5f5bf9b43.tar.bz2
pianobar-ebfd7d45c6b8eb5b2a1ee6e97a3f21f5f5bf9b43.zip
fix warnings now noted due to format string checking
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
-rw-r--r--src/ui.c10
-rw-r--r--src/ui_act.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 4cca654..ba46770 100644
--- a/src/main.c
+++ b/src/main.c
@@ -328,7 +328,7 @@ static void BarMainPrintTime (BarApp_t *app) {
sign = POSITIVE;
songRemaining = -songRemaining;
}
- BarUiMsg (&app->settings, MSG_TIME, "%c%02i:%02i/%02i:%02i\r",
+ BarUiMsg (&app->settings, MSG_TIME, "%c%02i:%02i/%02li:%02li\r",
(sign == POSITIVE ? '+' : '-'),
songRemaining / 60, songRemaining % 60,
app->player.songDuration / BAR_PLAYER_MS_TO_S_FACTOR / 60,
diff --git a/src/ui.c b/src/ui.c
index 167b3c2..4bd70fd 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -354,7 +354,7 @@ PianoStation_t *BarUiSelectStation (BarApp_t *app, PianoStation_t *stations,
const PianoStation_t *currStation = sortedStations[i];
/* filter stations */
if (BarStrCaseStr (currStation->name, buf) != NULL) {
- BarUiMsg (&app->settings, MSG_LIST, "%2i) %c%c%c %s\n", i,
+ BarUiMsg (&app->settings, MSG_LIST, "%2zi) %c%c%c %s\n", i,
currStation->useQuickMix ? 'q' : ' ',
currStation->isQuickMix ? 'Q' : ' ',
!currStation->isCreator ? 'S' : ' ',
@@ -364,10 +364,10 @@ PianoStation_t *BarUiSelectStation (BarApp_t *app, PianoStation_t *stations,
}
}
- BarUiMsg (&app->settings, MSG_QUESTION, prompt);
+ BarUiMsg (&app->settings, MSG_QUESTION, "%s", prompt);
if (autoselect && displayCount == 1 && stationCount != 1) {
/* auto-select last remaining station */
- BarUiMsg (&app->settings, MSG_NONE, "%i\n", lastDisplayed);
+ BarUiMsg (&app->settings, MSG_NONE, "%zi\n", lastDisplayed);
retStation = sortedStations[lastDisplayed];
} else {
if (BarReadlineStr (buf, sizeof (buf), &app->input,
@@ -441,7 +441,7 @@ PianoArtist_t *BarUiSelectArtist (BarApp_t *app, PianoArtist_t *startArtist) {
tmpArtist = startArtist;
PianoListForeachP (tmpArtist) {
if (BarStrCaseStr (tmpArtist->name, buf) != NULL) {
- BarUiMsg (&app->settings, MSG_LIST, "%2u) %s\n", i,
+ BarUiMsg (&app->settings, MSG_LIST, "%2lu) %s\n", i,
tmpArtist->name);
}
i++;
@@ -477,7 +477,7 @@ char *BarUiSelectMusicId (BarApp_t *app, PianoStation_t *station,
PianoArtist_t *tmpArtist;
PianoSong_t *tmpSong;
- BarUiMsg (&app->settings, MSG_QUESTION, msg);
+ BarUiMsg (&app->settings, MSG_QUESTION, "%s", msg);
if (BarReadlineStr (lineBuf, sizeof (lineBuf), &app->input,
BAR_RL_DEFAULT) > 0) {
PianoReturn_t pRet;
diff --git a/src/ui_act.c b/src/ui_act.c
index 4584117..d5c6b2b 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -724,7 +724,7 @@ BarUiActCallback(BarUiActManageStation) {
return;
}
- BarUiMsg (&app->settings, MSG_QUESTION, question);
+ BarUiMsg (&app->settings, MSG_QUESTION, "%s", question);
if (BarReadline (selectBuf, sizeof (selectBuf), allowedActions, &app->input,
BAR_RL_FULLRETURN, -1)) {
if (selectBuf[0] == 'a') {