Skip to content
Browse files

Fix format strings

"%lu" was used to display variables of type size_t instead of "%zu". This caused
compilation failures when using -Werror.

Thanks to Truls Becken for reporting and fixing this issue.
  • Loading branch information...
1 parent ffedfba commit d55432f8c52bcf438daa3233ac433b3e5c4f40aa @Schnouki committed
Showing with 3 additions and 3 deletions.
  1. +2 −2 plugins/savestate.c
  2. +1 −1 src/spotify.c
View
4 plugins/savestate.c
@@ -169,7 +169,7 @@ static gboolean really_restore_state(gpointer data) {
if (track_available(tr))
queue_add_track(FALSE, tr);
else {
- g_info("savestate: track %lu is no longer available", i);
+ g_info("savestate: track %zu is no longer available", i);
if (s->cur_track == i) {
s->cur_track = -1;
s->qs = STOPPED;
@@ -277,7 +277,7 @@ static void restore_state(session_callback_type type, gpointer data, gpointer us
sp_link* lnk = sp_link_create_from_string(uri);
sp_linktype lt = sp_link_type(lnk);
if (lt != SP_LINKTYPE_TRACK) {
- g_warning("savestate: invalid link type for track %lu: %d", i, lt);
+ g_warning("savestate: invalid link type for track %zu: %d", i, lt);
sp_link_release(lnk);
goto restorestate_error;
}
View
2 src/spotify.c
@@ -139,7 +139,7 @@ void session_init() {
}
size_t cache_size = config_get_int_opt("cache_size", 0);
- g_debug("Setting cache size to %lu.", cache_size);
+ g_debug("Setting cache size to %zu.", cache_size);
sp_session_set_cache_size(g_session, cache_size);
g_debug("Session created.");

0 comments on commit d55432f

Please sign in to comment.
Something went wrong with that request. Please try again.