changeset 934:d49227a584b0 trunk

[svn] - fix warnings with -Wunsigned -Wextra
author nenolod
date Thu, 12 Apr 2007 10:47:23 -0700
parents 35ec41daad52
children fd9843dafb51
files ChangeLog src/curl/Makefile src/curl/curl.c
diffstat 3 files changed, 27 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 10 14:43:25 2007 -0700
+++ b/ChangeLog	Thu Apr 12 10:47:23 2007 -0700
@@ -1,3 +1,11 @@
+2007-04-10 21:43:25 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1994]
+  - allow AOSD to be forcefully enabled
+  
+  trunk/configure.ac |   26 +++++++++++++++++++++-----
+  1 file changed, 21 insertions(+), 5 deletions(-)
+
+
 2007-04-10 21:19:15 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1992]
   - chase audacious r4268 (patch by Joker).
--- a/src/curl/Makefile	Tue Apr 10 14:43:25 2007 -0700
+++ b/src/curl/Makefile	Thu Apr 12 10:47:23 2007 -0700
@@ -11,7 +11,7 @@
 
 SOURCES = curl.c
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(BEEP_DEFINES) $(CURL_CFLAGS) -I../../intl -I../..
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(BEEP_DEFINES) $(CURL_CFLAGS) -I../../intl -I../.. -Wextra -Wuninitialized
 
 OBJECTS = ${SOURCES:.c=.o}
 
--- a/src/curl/curl.c	Tue Apr 10 14:43:25 2007 -0700
+++ b/src/curl/curl.c	Thu Apr 12 10:47:23 2007 -0700
@@ -47,21 +47,21 @@
   CURL *curl;
 
   gssize length; // the length of the file
-  gsize rd_abs; // the absolute position for reading from the stream
-  gsize wr_abs; // the absolute position where the input connection is
+  gssize rd_abs; // the absolute position for reading from the stream
+  gssize wr_abs; // the absolute position where the input connection is
 
-  gsize icy_left;
-  gsize icy_interval;
+  gssize icy_left;
+  gssize icy_interval;
   gint in_icy_meta; // 0=no, 1=before size, 2=in data
-  gsize meta_abs; // the absolute position where the metadata changes
+  gssize meta_abs; // the absolute position where the metadata changes
 
-  gsize buffer_length;
+  gssize buffer_length;
   gchar *buffer;
 
-  gsize rd_index;
-  gsize wr_index;
+  gssize rd_index;
+  gssize wr_index;
 
-  gsize hdr_index;
+  gssize hdr_index;
 
   GSList *stream_stack; // stack for stream functions (getc, ungetc)
 
@@ -98,11 +98,11 @@
  *  3) open, read, seek 0, read (without restarting fetch)
  */
 
-static size_t buf_space(CurlHandle *handle)
+static ssize_t buf_space(CurlHandle *handle)
 {
-  size_t rd_edge = handle->rd_abs - REVERSE_SEEK_SIZE;
-  size_t buffer_limit;
-  size_t cont_limit;
+  ssize_t rd_edge = handle->rd_abs - REVERSE_SEEK_SIZE;
+  ssize_t buffer_limit;
+  ssize_t cont_limit;
   if (rd_edge < 0)
     rd_edge = 0;
   buffer_limit = handle->buffer_length - 
@@ -186,7 +186,7 @@
 		(handle->hdr_index + strlen(header)) % handle->buffer_length);
 }
 
-static void got_header(CurlHandle *handle, size_t size)
+static void got_header(CurlHandle *handle, ssize_t size)
 {
   if (DEBUG_HEADERS)
     g_print("Got header %d bytes\n", size);
@@ -381,7 +381,7 @@
 
       if (handle->header)
 	{
-	  gsize i = handle->hdr_index;
+	  gssize i = handle->hdr_index;
 	  while (1)
 	    {
 	      if ((i + 1) % handle->buffer_length == handle->wr_index)
@@ -389,7 +389,7 @@
 	      if (handle->buffer[i] == '\r' &&
 		  handle->buffer[(i + 1) % handle->buffer_length] == '\n')
 		{
-		  gsize size = (handle->buffer_length + i - 
+		  gssize size = (handle->buffer_length + i - 
 				handle->hdr_index) % handle->buffer_length;
 		  handle->buffer[i] = '\0';
 		  got_header(handle, size);
@@ -672,7 +672,7 @@
 {
   CurlHandle *handle = file->handle;
   ssize_t sz = size * nmemb;
-  size_t ret = 0;
+  ssize_t ret = 0;
 
   if (sz < 0)
     return 0;
@@ -702,7 +702,7 @@
 
   while (ret < sz)
     {
-      size_t available;
+      ssize_t available;
       while (!(available = buf_available(handle)) && !handle->cancel)
 	{
 	  //g_print("Wait for data on %p\n", handle);