From f31784859de08fc05b8a744e7fe8d713693734b9 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 4 May 2010 19:45:35 +0200 Subject: fixed lots of gcc warnings --- Makefile.am | 3 +- configure.ac | 2 +- junklib.c | 4 +-- main.c | 2 +- messagepump.c | 2 +- optmath.h | 2 +- plugins/alsa/alsa.c | 10 +++---- plugins/dumb/dumb-kode54/src/it/readmod.c | 2 +- plugins/dumb/dumb-kode54/src/it/readpsm.c | 2 +- plugins/dumb/dumb-kode54/src/it/readriff.c | 2 +- plugins/gtkui/gdkdrawing.c | 48 +++++++++++++++--------------- plugins/gtkui/gtkui.c | 2 ++ plugins/lastfm/lastfm.c | 6 ++-- plugins/notify/notify.c | 4 +-- plugins/oss/oss.c | 2 +- streamer.c | 8 ++--- utf8.c | 2 +- 17 files changed, 52 insertions(+), 51 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0d405ce1..495ce754 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,8 +24,7 @@ deadbeef_SOURCES =\ sdkdir = $(pkgincludedir) sdk_HEADERS = deadbeef.h -#deadbeef_LDADD = $(LDADD) $(DEPS_LIBS) $(ICONV_LIB) -lstdc++ -lm -deadbeef_LDADD = $(LDADD) $(DEPS_LIBS) $(ICONV_LIB) -lm +deadbeef_LDADD = $(LDADD) $(DEPS_LIBS) $(ICONV_LIB) -lm -ldl -lpthread AM_CFLAGS = $(DEPS_CFLAGS) -std=c99 AM_CPPFLAGS = $(DEPS_CFLAGS) diff --git a/configure.ac b/configure.ac index 5d579a60..7f52da76 100644 --- a/configure.ac +++ b/configure.ac @@ -40,7 +40,7 @@ esac test "x$prefix" = xNONE && prefix=$ac_default_prefix -dnl INSANE_CFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits -Wbad-function-cast" +dnl INSANE_CFLAGS="-Wformat -Wdisabled-optimization -Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits -Wbad-function-cast" dnl INSANE_CXXFLAGS="-Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits" AC_SUBST(INSANE_CFLAGS) diff --git a/junklib.c b/junklib.c index a437e400..d91f886d 100644 --- a/junklib.c +++ b/junklib.c @@ -2601,7 +2601,7 @@ junk_id3v2_read_full (playItem_t *it, DB_id3v2_tag_t *tag_store, DB_FILE *fp) { if (tag_store) { DB_id3v2_frame_t *frm = malloc (sizeof (DB_id3v2_frame_t) + sz); if (!frm) { - fprintf (stderr, "junklib: failed to alloc %d bytes for id3v2 frame %s\n", sizeof (DB_id3v2_frame_t) + sz, frameid); + fprintf (stderr, "junklib: failed to alloc %d bytes for id3v2 frame %s\n", (int)(sizeof (DB_id3v2_frame_t) + sz), frameid); goto error; } memset (frm, 0, sizeof (DB_id3v2_frame_t)); @@ -2781,7 +2781,7 @@ junk_id3v2_read_full (playItem_t *it, DB_id3v2_tag_t *tag_store, DB_FILE *fp) { if (tag_store) { DB_id3v2_frame_t *frm = malloc (sizeof (DB_id3v2_frame_t) + sz); if (!frm) { - fprintf (stderr, "junklib: failed to alloc %d bytes for id3v2.2 frame %s\n", sizeof (DB_id3v2_frame_t) + sz, frameid); + fprintf (stderr, "junklib: failed to alloc %d bytes for id3v2.2 frame %s\n", (int)(sizeof (DB_id3v2_frame_t) + sz), frameid); goto error; } memset (frm, 0, sizeof (DB_id3v2_frame_t)); diff --git a/main.c b/main.c index dd6e9503..8df51535 100644 --- a/main.c +++ b/main.c @@ -558,7 +558,7 @@ main (int argc, char *argv[]) { fwrite (prn, 1, strlen (prn), stderr); } else if (sz > 0 && out[0]) { - fprintf (stderr, "got unknown response:\nlength=%d\n%s\n", sz, out); + fprintf (stderr, "got unknown response:\nlength=%d\n%s\n", (int)sz, out); } } close (s); diff --git a/messagepump.c b/messagepump.c index 58516f34..2c93eb45 100644 --- a/messagepump.c +++ b/messagepump.c @@ -67,7 +67,7 @@ messagepump_reset (void) { int messagepump_push (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { if (!mfree) { - printf ("WARNING: message queue is full! message ignored (%d %p %d %d)\n", id, ctx, p1, p2); + printf ("WARNING: message queue is full! message ignored (%d %p %d %d)\n", id, (void*)ctx, p1, p2); return -1; } mutex_lock (mutex); diff --git a/optmath.h b/optmath.h index b5aa8c61..898c0fd7 100644 --- a/optmath.h +++ b/optmath.h @@ -93,7 +93,7 @@ static __inline void fpu_restore(fpu_control fpu){ /* Optimized code path for x86_64 builds. Uses SSE2 intrinsics. This can be done safely because all x86_64 CPUs supports SSE2. */ #if (defined(__FORCE_SSE2__)) || (defined(_MSC_VER) && defined(_WIN64)) || (defined(__GNUC__) && defined (__x86_64__)) -#pragma warning using sse2 for ftoi +#pragma warning "using sse2 for ftoi" # define FPU_CONTROL typedef int16_t fpu_control; diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index 74078fad..2a2867b3 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -190,12 +190,12 @@ palsa_set_hw_params (int samplerate) { req_period_size = deadbeef->conf_get_int ("alsa.period", DEFAULT_PERIOD_SIZE); buffer_size = req_buffer_size; period_size = req_period_size; - trace ("trying buffer size: %d frames\n", buffer_size); - trace ("trying period size: %d frames\n", period_size); + trace ("trying buffer size: %d frames\n", (int)buffer_size); + trace ("trying period size: %d frames\n", (int)period_size); snd_pcm_hw_params_set_buffer_size_near (audio, hw_params, &buffer_size); snd_pcm_hw_params_set_period_size_near (audio, hw_params, &period_size, NULL); - trace ("alsa buffer size: %d frames\n", buffer_size); - trace ("alsa period size: %d frames\n", period_size); + trace ("alsa buffer size: %d frames\n", (int)buffer_size); + trace ("alsa period size: %d frames\n", (int)period_size); if ((err = snd_pcm_hw_params (audio, hw_params)) < 0) { trace ("cannot set parameters (%s)\n", @@ -316,7 +316,7 @@ palsa_change_rate (int rate) { return alsa_rate; } if (rate == alsa_rate) { - trace ("palsa_change_rate: ignored\n", rate); + trace ("palsa_change_rate %d: ignored\n", rate); return rate; } state = OUTPUT_STATE_STOPPED; diff --git a/plugins/dumb/dumb-kode54/src/it/readmod.c b/plugins/dumb/dumb-kode54/src/it/readmod.c index 0963c6d9..b6b35cbe 100644 --- a/plugins/dumb/dumb-kode54/src/it/readmod.c +++ b/plugins/dumb/dumb-kode54/src/it/readmod.c @@ -446,7 +446,7 @@ static DUMB_IT_SIGDATA *it_mod_load_sigdata(DUMBFILE *f, int restrict) DUMB_IT_SIGDATA *sigdata; int n_channels; int i; - unsigned long fft; + unsigned long fft = 0; DUMBFILE *rem; f = dumbfile_buffer_mod(f, &fft); diff --git a/plugins/dumb/dumb-kode54/src/it/readpsm.c b/plugins/dumb/dumb-kode54/src/it/readpsm.c index 129cdf6f..07b33613 100644 --- a/plugins/dumb/dumb-kode54/src/it/readpsm.c +++ b/plugins/dumb/dumb-kode54/src/it/readpsm.c @@ -456,7 +456,7 @@ static DUMB_IT_SIGDATA *it_psm_load_sigdata(DUMBFILE *f, int * ver, int subsong) PSMCHUNK *songchunk; int n_song_chunks = 0; - PSMEVENT *event; + PSMEVENT *event = NULL; int n_events = 0; unsigned char * ptr; diff --git a/plugins/dumb/dumb-kode54/src/it/readriff.c b/plugins/dumb/dumb-kode54/src/it/readriff.c index 615e555c..cc1e82fb 100644 --- a/plugins/dumb/dumb-kode54/src/it/readriff.c +++ b/plugins/dumb/dumb-kode54/src/it/readriff.c @@ -38,7 +38,7 @@ DUH *dumb_read_riff_quick( DUMBFILE * f ) { unsigned char * buffer = 0; unsigned size = 0; - unsigned read; + long read; do { buffer = realloc( buffer, 32768 + size ); diff --git a/plugins/gtkui/gdkdrawing.c b/plugins/gtkui/gdkdrawing.c index 2e60c090..bed21e34 100644 --- a/plugins/gtkui/gdkdrawing.c +++ b/plugins/gtkui/gdkdrawing.c @@ -206,13 +206,13 @@ gtkui_init_theme_colors (void) { memcpy (>kui_bar_background_color, &style->fg[GTK_STATE_NORMAL], sizeof (GdkColor)); } else { - snprintf (color_text, sizeof (color_text), "%d %d %d", style->base[GTK_STATE_SELECTED].red, style->base[GTK_STATE_SELECTED].green, style->base[GTK_STATE_SELECTED].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->base[GTK_STATE_SELECTED].red, style->base[GTK_STATE_SELECTED].green, style->base[GTK_STATE_SELECTED].blue); clr = deadbeef->conf_get_str ("gtkui.color.bar_foreground", color_text); - sscanf (clr, "%d %d %d", >kui_bar_foreground_color.red, >kui_bar_foreground_color.green, >kui_bar_foreground_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_bar_foreground_color.red, >kui_bar_foreground_color.green, >kui_bar_foreground_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->fg[GTK_STATE_NORMAL].red, style->fg[GTK_STATE_NORMAL].green, style->fg[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->fg[GTK_STATE_NORMAL].red, style->fg[GTK_STATE_NORMAL].green, style->fg[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.bar_background", color_text); - sscanf (clr, "%d %d %d", >kui_bar_background_color.red, >kui_bar_background_color.green, >kui_bar_background_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_bar_background_color.red, >kui_bar_background_color.green, >kui_bar_background_color.blue); } @@ -223,21 +223,21 @@ gtkui_init_theme_colors (void) { memcpy (>kui_tabstrip_base_color, &style->bg[GTK_STATE_NORMAL], sizeof (GdkColor)); } else { - snprintf (color_text, sizeof (color_text), "%d %d %d", style->dark[GTK_STATE_NORMAL].red, style->dark[GTK_STATE_NORMAL].green, style->dark[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->dark[GTK_STATE_NORMAL].red, style->dark[GTK_STATE_NORMAL].green, style->dark[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.tabstrip_dark", color_text); - sscanf (clr, "%d %d %d", >kui_tabstrip_dark_color.red, >kui_tabstrip_dark_color.green, >kui_tabstrip_dark_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_tabstrip_dark_color.red, >kui_tabstrip_dark_color.green, >kui_tabstrip_dark_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.tabstrip_mid", color_text); - sscanf (clr, "%d %d %d", >kui_tabstrip_mid_color.red, >kui_tabstrip_mid_color.green, >kui_tabstrip_mid_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_tabstrip_mid_color.red, >kui_tabstrip_mid_color.green, >kui_tabstrip_mid_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->light[GTK_STATE_NORMAL].red, style->light[GTK_STATE_NORMAL].green, style->light[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->light[GTK_STATE_NORMAL].red, style->light[GTK_STATE_NORMAL].green, style->light[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.tabstrip_light", color_text); - sscanf (clr, "%d %d %d", >kui_tabstrip_light_color.red, >kui_tabstrip_light_color.green, >kui_tabstrip_light_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_tabstrip_light_color.red, >kui_tabstrip_light_color.green, >kui_tabstrip_light_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->bg[GTK_STATE_NORMAL].red, style->bg[GTK_STATE_NORMAL].green, style->bg[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->bg[GTK_STATE_NORMAL].red, style->bg[GTK_STATE_NORMAL].green, style->bg[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.tabstrip_base", color_text); - sscanf (clr, "%d %d %d", >kui_tabstrip_base_color.red, >kui_tabstrip_base_color.green, >kui_tabstrip_base_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_tabstrip_base_color.red, >kui_tabstrip_base_color.green, >kui_tabstrip_base_color.blue); } if (!override_listview_colors) { @@ -249,29 +249,29 @@ gtkui_init_theme_colors (void) { memcpy (>kui_listview_cursor_color, &style->fg[GTK_STATE_NORMAL], sizeof (GdkColor)); } else { - snprintf (color_text, sizeof (color_text), "%d %d %d", style->light[GTK_STATE_NORMAL].red, style->light[GTK_STATE_NORMAL].green, style->light[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->light[GTK_STATE_NORMAL].red, style->light[GTK_STATE_NORMAL].green, style->light[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_even_row", color_text); - sscanf (clr, "%d %d %d", >kui_listview_even_row_color.red, >kui_listview_even_row_color.green, >kui_listview_even_row_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_even_row_color.red, >kui_listview_even_row_color.green, >kui_listview_even_row_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_odd_row", color_text); - sscanf (clr, "%d %d %d", >kui_listview_odd_row_color.red, >kui_listview_odd_row_color.green, >kui_listview_odd_row_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_odd_row_color.red, >kui_listview_odd_row_color.green, >kui_listview_odd_row_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->mid[GTK_STATE_NORMAL].red, style->mid[GTK_STATE_NORMAL].green, style->mid[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_selection", color_text); - sscanf (clr, "%d %d %d", >kui_listview_selection_color.red, >kui_listview_selection_color.green, >kui_listview_selection_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_selection_color.red, >kui_listview_selection_color.green, >kui_listview_selection_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->fg[GTK_STATE_NORMAL].red, style->fg[GTK_STATE_NORMAL].green, style->fg[GTK_STATE_NORMAL].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->fg[GTK_STATE_NORMAL].red, style->fg[GTK_STATE_NORMAL].green, style->fg[GTK_STATE_NORMAL].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_text", color_text); - sscanf (clr, "%d %d %d", >kui_listview_text_color.red, >kui_listview_text_color.green, >kui_listview_text_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_text_color.red, >kui_listview_text_color.green, >kui_listview_text_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->fg[GTK_STATE_SELECTED].red, style->fg[GTK_STATE_SELECTED].green, style->fg[GTK_STATE_SELECTED].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->fg[GTK_STATE_SELECTED].red, style->fg[GTK_STATE_SELECTED].green, style->fg[GTK_STATE_SELECTED].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_selected_text", color_text); - sscanf (clr, "%d %d %d", >kui_listview_selected_text_color.red, >kui_listview_selected_text_color.green, >kui_listview_selected_text_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_selected_text_color.red, >kui_listview_selected_text_color.green, >kui_listview_selected_text_color.blue); - snprintf (color_text, sizeof (color_text), "%d %d %d", style->fg[GTK_STATE_SELECTED].red, style->fg[GTK_STATE_SELECTED].green, style->fg[GTK_STATE_SELECTED].blue); + snprintf (color_text, sizeof (color_text), "%hd %hd %hd", style->fg[GTK_STATE_SELECTED].red, style->fg[GTK_STATE_SELECTED].green, style->fg[GTK_STATE_SELECTED].blue); clr = deadbeef->conf_get_str ("gtkui.color.listview_cursor", color_text); - sscanf (clr, "%d %d %d", >kui_listview_cursor_color.red, >kui_listview_cursor_color.green, >kui_listview_cursor_color.blue); + sscanf (clr, "%hd %hd %hd", >kui_listview_cursor_color.red, >kui_listview_cursor_color.green, >kui_listview_cursor_color.blue); } } diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index d592f268..480c6663 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -421,6 +421,7 @@ paused_cb (gpointer nothing) { static int gtkui_on_paused (DB_event_state_t *ev, uintptr_t data) { g_idle_add (paused_cb, NULL); + return 0; } void @@ -439,6 +440,7 @@ playlistchanged_cb (gpointer none) { static int gtkui_on_playlistchanged (DB_event_t *ev, uintptr_t data) { g_idle_add (playlistchanged_cb, NULL); + return 0; } static gboolean diff --git a/plugins/lastfm/lastfm.c b/plugins/lastfm/lastfm.c index 06e462f8..986bd03f 100644 --- a/plugins/lastfm/lastfm.c +++ b/plugins/lastfm/lastfm.c @@ -196,15 +196,15 @@ auth (void) { char token[100]; deadbeef->md5 (sig, lfm_pass, strlen (lfm_pass)); deadbeef->md5_to_str (passmd5, sig); - snprintf (token, sizeof (token), "%s%d", passmd5, timestamp); + snprintf (token, sizeof (token), "%s%d", passmd5, (int)timestamp); deadbeef->md5 (sig, token, strlen (token)); deadbeef->md5_to_str (token, sig); const char *scrobbler_url = deadbeef->conf_get_str ("lastfm.scrobbler_url", SCROBBLER_URL_LFM); #if LFM_TESTMODE - snprintf (req, sizeof (req), "%s/?hs=true&p=1.2.1&c=tst&v=1.0&u=%s&t=%d&a=%s", scrobbler_url, lfm_user, timestamp, token); + snprintf (req, sizeof (req), "%s/?hs=true&p=1.2.1&c=tst&v=1.0&u=%s&t=%d&a=%s", scrobbler_url, lfm_user, (int)timestamp, token); #else - snprintf (req, sizeof (req), "%s/?hs=true&p=1.2.1&c=%s&v=%d.%d&u=%s&t=%d&a=%s", scrobbler_url, LFM_CLIENTID, plugin.plugin.version_major, plugin.plugin.version_minor, lfm_user, timestamp, token); + snprintf (req, sizeof (req), "%s/?hs=true&p=1.2.1&c=%s&v=%d.%d&u=%s&t=%d&a=%s", scrobbler_url, LFM_CLIENTID, plugin.plugin.version_major, plugin.plugin.version_minor, lfm_user, (int)timestamp, token); #endif // handshake int status = curl_req_send (req, NULL); diff --git a/plugins/notify/notify.c b/plugins/notify/notify.c index e6c8e4b1..1f1bc194 100644 --- a/plugins/notify/notify.c +++ b/plugins/notify/notify.c @@ -31,7 +31,7 @@ DB_misc_t plugin; #define NOTIFY_DEFAULT_FORMAT "%a - %t" - +#if 0 static void notify_marshal_dict_byte(DBusMessageIter *iter, const char *key, char value) { @@ -59,7 +59,7 @@ notify_marshal_dict_string(DBusMessageIter *iter, const char *key, const char *v dbus_message_iter_close_container(&entry, &variant); dbus_message_iter_close_container(iter, &entry); } - +#endif static int on_songchanged (DB_event_trackchange_t *ev, uintptr_t data) { diff --git a/plugins/oss/oss.c b/plugins/oss/oss.c index 9bd59c2a..7d05727c 100644 --- a/plugins/oss/oss.c +++ b/plugins/oss/oss.c @@ -133,7 +133,7 @@ oss_change_rate (int rate) { return oss_rate; } if (rate == oss_rate) { - trace ("oss_change_rate: ignored\n", rate); + trace ("oss_change_rate %d: ignored\n", rate); return rate; } deadbeef->mutex_lock (mutex); diff --git a/streamer.c b/streamer.c index ae0a2b33..5493021e 100644 --- a/streamer.c +++ b/streamer.c @@ -789,8 +789,8 @@ streamer_thread (void *ctx) { continue; } trace ("bytes_until_next_song=0, starting playback of new song\n"); - playItem_t *from = playing_track; - playItem_t *to = streaming_track; + //playItem_t *from = playing_track; + //playItem_t *to = streaming_track; trace ("sending songchanged\n"); bytes_until_next_song = -1; // plugin will get pointer to str_playing_song @@ -1051,7 +1051,7 @@ streamer_reset (int full) { // must be called when current song changes by exter src_reset (src); // reset dsp DB_dsp_t **dsp = deadbeef->plug_get_dsp_list (); - int srate = p_get_rate (); + //int srate = p_get_rate (); for (int i = 0; dsp[i]; i++) { if (dsp[i]->enabled ()) { dsp[i]->reset (); @@ -1318,7 +1318,7 @@ streamer_decode_src_libsamplerate (uint8_t *bytes, int size) { if (src_err) { const char *err = src_strerror (src_err) ; fprintf (stderr, "src_process error %s\n" - "srcdata.data_in=%p, srcdata.data_out=%p, srcdata.input_frames=%d, srcdata.output_frames=%d, srcdata.src_ratio=%f", err, srcdata.data_in, srcdata.data_out, srcdata.input_frames, srcdata.output_frames, (float)srcdata.src_ratio); + "srcdata.data_in=%p, srcdata.data_out=%p, srcdata.input_frames=%d, srcdata.output_frames=%d, srcdata.src_ratio=%f", err, srcdata.data_in, srcdata.data_out, (int)srcdata.input_frames, (int)srcdata.output_frames, (float)srcdata.src_ratio); exit (-1); } // convert back to s16 format diff --git a/utf8.c b/utf8.c index 6e6bb100..f25ade2c 100644 --- a/utf8.c +++ b/utf8.c @@ -352,7 +352,7 @@ int u8_escape_wchar(char *buf, int32_t sz, uint32_t ch) else if (ch < 32 || ch == 0x7f) return snprintf(buf, sz, "\\x%hhX", (unsigned char)ch); else if (ch > 0xFFFF) - return snprintf(buf, sz, "\\U%.8lX", (uint32_t)ch); + return snprintf(buf, sz, "\\U%.8X", (uint32_t)ch); else if (ch >= 0x80 && ch <= 0xFFFF) return snprintf(buf, sz, "\\u%.4hX", (unsigned short)ch); -- cgit v1.2.3