changeset 940:356d2335a975 trunk

[svn] - fix curl.c:913: warning: implicit declaration of function 'strdup'
author nenolod
date Thu, 12 Apr 2007 11:29:07 -0700
parents 0e40e86fe338
children fcbf649fefc4
files ChangeLog src/curl/Makefile src/curl/curl.c
diffstat 3 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 12 11:26:44 2007 -0700
+++ b/ChangeLog	Thu Apr 12 11:29:07 2007 -0700
@@ -1,3 +1,11 @@
+2007-04-12 18:26:44 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [2006]
+  - clear up instantiation warnings
+  
+  trunk/src/curl/curl.c |    5 +++--
+  1 file changed, 3 insertions(+), 2 deletions(-)
+
+
 2007-04-12 18:07:04 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [2004]
   - use unsigned char instead of gpointer for arithmetic to ensure that writes are 8-bit aligned.
--- a/src/curl/Makefile	Thu Apr 12 11:26:44 2007 -0700
+++ b/src/curl/Makefile	Thu Apr 12 11:29:07 2007 -0700
@@ -11,13 +11,13 @@
 
 SOURCES = curl.c
 
-CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(BEEP_DEFINES) $(CURL_CFLAGS) -I../../intl -I../.. -Wextra -Wuninitialized
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(GLIB_CFLAGS) $(PANGO_CFLAGS) $(BEEP_DEFINES) $(CURL_CFLAGS) -I../../intl -I../..
 
 CFLAGS += -Wpointer-arith -Wimplicit -Wnested-externs -Wcast-align \
 -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -W -Wno-unused -Wshadow -Wmissing-noreturn \
 -Wundef -Wpacked -Wnested-externs -Wbad-function-cast -Wredundant-decls \
--Wfloat-equal -Wformat=2 -Wdisabled-optimization -pedantic
+-Wfloat-equal -Wdisabled-optimization -pedantic -std=c99
 
 OBJECTS = ${SOURCES:.c=.o}
 
--- a/src/curl/curl.c	Thu Apr 12 11:26:44 2007 -0700
+++ b/src/curl/curl.c	Thu Apr 12 11:29:07 2007 -0700
@@ -201,7 +201,7 @@
 static gchar *get_value(CurlHandle *handle, size_t size, const char *header)
 {
   // XXXX wrapped headers
-  return strdup(handle->buffer + 
+  return g_strdup(handle->buffer + 
 		(handle->hdr_index + strlen(header)) % handle->buffer_length);
 }
 
@@ -910,9 +910,9 @@
 {
   CurlHandle *handle = file->handle;
   if (!strcmp(field, "stream-name") && handle->name != NULL)
-    return strdup(handle->name);
+    return g_strdup(handle->name);
   if (!strcmp(field, "track-name") && handle->title != NULL)
-    return strdup(handle->title);
+    return g_strdup(handle->title);
   if (!strcmp(field, "content-length"))
     return g_strdup_printf("%ld", handle->length);
   return NULL;