From fe2b5e365b2850e77b063584b3fd23d9090e231c Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 2 Oct 2009 16:54:25 +0000 Subject: small fixes for warnings with gcc 4.4.1 on ArchLinux --- src/curlhelper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/curlhelper.c b/src/curlhelper.c index 8b4d087..a2d442f 100644 --- a/src/curlhelper.c +++ b/src/curlhelper.c @@ -35,7 +35,7 @@ int curlhelp_buffer_callback( void *buffer, size_t size, size_t nmemb, void *str curlhelp_curlbuf *buf = (curlhelp_curlbuf *)stream; while( buf->bufsize < buf->buflen + size * nmemb + 1 ) { - buf->bufsize *= buf->bufsize * 1.3; + buf->bufsize *= buf->bufsize * 2; buf->buf = (char *)realloc( buf->buf, buf->bufsize ); if( buf->buf == NULL ) { return -1; @@ -46,7 +46,7 @@ int curlhelp_buffer_callback( void *buffer, size_t size, size_t nmemb, void *str buf->buflen += size * nmemb; buf->buf[buf->buflen] = '\0'; - return size * nmemb; + return (int)( size * nmemb ); } void curlhelp_freebuffer( curlhelp_curlbuf *buf ) { @@ -63,7 +63,7 @@ int curlhelp_parse_statusline( char *buf, curlhelp_statusline *status_line ) { first_line_end = strstr( buf, "\r\n" ); if( first_line_end == NULL ) return -1; - first_line_len = first_line_end - buf; + first_line_len = (size_t)( first_line_end - buf ); status_line->first_line = (char *)malloc( first_line_len + 1 ); if( status_line->first_line == NULL ) return -1; memcpy( status_line->first_line, buf, first_line_len ); -- cgit v1.2.3-54-g00ecf