summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-04 19:45:35 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-05-04 19:45:35 +0200
commitf31784859de08fc05b8a744e7fe8d713693734b9 (patch)
tree2a308acb3c6530f05a5c0b30ffabc30fbd1abe55 /plugins
parent9ca2a9c5ceaabb9f5db53ae85ab1179dbd6e4d2b (diff)
fixed lots of gcc warnings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/alsa/alsa.c10
-rw-r--r--plugins/dumb/dumb-kode54/src/it/readmod.c2
-rw-r--r--plugins/dumb/dumb-kode54/src/it/readpsm.c2
-rw-r--r--plugins/dumb/dumb-kode54/src/it/readriff.c2
-rw-r--r--plugins/gtkui/gdkdrawing.c48
-rw-r--r--plugins/gtkui/gtkui.c2
-rw-r--r--plugins/lastfm/lastfm.c6
-rw-r--r--plugins/notify/notify.c4
-rw-r--r--plugins/oss/oss.c2
9 files changed, 40 insertions, 38 deletions
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 (&gtkui_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", &gtkui_bar_foreground_color.red, &gtkui_bar_foreground_color.green, &gtkui_bar_foreground_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_bar_foreground_color.red, &gtkui_bar_foreground_color.green, &gtkui_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", &gtkui_bar_background_color.red, &gtkui_bar_background_color.green, &gtkui_bar_background_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_bar_background_color.red, &gtkui_bar_background_color.green, &gtkui_bar_background_color.blue);
}
@@ -223,21 +223,21 @@ gtkui_init_theme_colors (void) {
memcpy (&gtkui_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", &gtkui_tabstrip_dark_color.red, &gtkui_tabstrip_dark_color.green, &gtkui_tabstrip_dark_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_tabstrip_dark_color.red, &gtkui_tabstrip_dark_color.green, &gtkui_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", &gtkui_tabstrip_mid_color.red, &gtkui_tabstrip_mid_color.green, &gtkui_tabstrip_mid_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_tabstrip_mid_color.red, &gtkui_tabstrip_mid_color.green, &gtkui_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", &gtkui_tabstrip_light_color.red, &gtkui_tabstrip_light_color.green, &gtkui_tabstrip_light_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_tabstrip_light_color.red, &gtkui_tabstrip_light_color.green, &gtkui_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", &gtkui_tabstrip_base_color.red, &gtkui_tabstrip_base_color.green, &gtkui_tabstrip_base_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_tabstrip_base_color.red, &gtkui_tabstrip_base_color.green, &gtkui_tabstrip_base_color.blue);
}
if (!override_listview_colors) {
@@ -249,29 +249,29 @@ gtkui_init_theme_colors (void) {
memcpy (&gtkui_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", &gtkui_listview_even_row_color.red, &gtkui_listview_even_row_color.green, &gtkui_listview_even_row_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_even_row_color.red, &gtkui_listview_even_row_color.green, &gtkui_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", &gtkui_listview_odd_row_color.red, &gtkui_listview_odd_row_color.green, &gtkui_listview_odd_row_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_odd_row_color.red, &gtkui_listview_odd_row_color.green, &gtkui_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", &gtkui_listview_selection_color.red, &gtkui_listview_selection_color.green, &gtkui_listview_selection_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_selection_color.red, &gtkui_listview_selection_color.green, &gtkui_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", &gtkui_listview_text_color.red, &gtkui_listview_text_color.green, &gtkui_listview_text_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_text_color.red, &gtkui_listview_text_color.green, &gtkui_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", &gtkui_listview_selected_text_color.red, &gtkui_listview_selected_text_color.green, &gtkui_listview_selected_text_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_selected_text_color.red, &gtkui_listview_selected_text_color.green, &gtkui_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", &gtkui_listview_cursor_color.red, &gtkui_listview_cursor_color.green, &gtkui_listview_cursor_color.blue);
+ sscanf (clr, "%hd %hd %hd", &gtkui_listview_cursor_color.red, &gtkui_listview_cursor_color.green, &gtkui_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);