# HG changeset patch # User nenolod # Date 1176402547 25200 # Node ID 356d2335a97551dc3def5f5d7ebea8854de89ca3 # Parent 0e40e86fe3384865bf7eee1deeef5f93fb0d11d3 [svn] - fix curl.c:913: warning: implicit declaration of function 'strdup' diff -r 0e40e86fe338 -r 356d2335a975 ChangeLog --- 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 + 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 revision [2004] - use unsigned char instead of gpointer for arithmetic to ensure that writes are 8-bit aligned. diff -r 0e40e86fe338 -r 356d2335a975 src/curl/Makefile --- 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} diff -r 0e40e86fe338 -r 356d2335a975 src/curl/curl.c --- 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;