diff Plugins/Input/mpg123/http.c @ 701:d539e5c5f730 trunk

[svn] Fixes of the remaining GCC 4.1 warnings from external contributor Diego "Flameeyes" Petteno (Gentoo).
author chainsaw
date Sun, 26 Feb 2006 13:08:35 -0800
parents 4e1d41a93cb3
children 71189eb31ea9
line wrap: on
line diff
--- a/Plugins/Input/mpg123/http.c	Sun Feb 26 10:21:49 2006 -0800
+++ b/Plugins/Input/mpg123/http.c	Sun Feb 26 13:08:35 2006 -0800
@@ -58,7 +58,8 @@
 extern gboolean mpg123_stereo;
 
 static gboolean prebuffering, going, eof = FALSE;
-static gint sock, rd_index, wr_index, buffer_length, prebuffer_length;
+static gint sock;
+static gsize rd_index, wr_index, buffer_length, prebuffer_length;
 static guint64 buffer_read = 0;
 static gchar *buffer;
 static GThread *thread;
@@ -188,7 +189,7 @@
 }
 
 
-static gint
+static gsize
 http_used(void)
 {
     if (wr_index >= rd_index)
@@ -196,7 +197,7 @@
     return buffer_length - (rd_index - wr_index);
 }
 
-static gint
+static gsize
 http_free(void)
 {
     if (rd_index > wr_index)
@@ -205,7 +206,7 @@
 }
 
 static void
-http_wait_for_data(gint bytes)
+http_wait_for_data(gsize bytes)
 {
     while ((prebuffering || http_used() < bytes) && !eof && going
            && mpg123_info->going)
@@ -227,9 +228,9 @@
 }
 
 int
-mpg123_http_read(gpointer data, gint length)
+mpg123_http_read(gpointer data, gsize length)
 {
-    gint len, cnt, off = 0, meta_len, meta_off = 0, i;
+    gsize len, cnt, off = 0, meta_len, meta_off = 0, i;
     gchar *meta_data, **tags;
 
     http_wait_for_data(length);
@@ -635,7 +636,7 @@
                 }
                 else {
                     status =
-                        g_strdup_printf(_("PRE-BUFFERING: %dKB/%dKB"),
+                        g_strdup_printf(_("PRE-BUFFERING: %luKB/%luKB"),
                                         http_used() / 1024,
                                         prebuffer_length / 1024);
                     mpg123_ip.set_info_text(status);