]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: add typecast to avoid warning
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 16:53:03 +0000 (18:53 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 Aug 2010 16:53:34 +0000 (18:53 +0200)
There is an implicit conversion from "unsigned long" to "long";
rounding, sign extension, or loss of accuracy may result.

lib/pingpong.c

index 7b2a66477872180acd720bdaa9898daf84367d57..876a6a215772b0b8cdb2d7b4fb174afa6b5c8520 100644 (file)
@@ -322,7 +322,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
        */
       DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1));
       memcpy(ptr, pp->cache, pp->cache_size);
-      gotbytes = pp->cache_size;
+      gotbytes = (ssize_t)pp->cache_size;
       free(pp->cache);    /* free the cache */
       pp->cache = NULL;   /* clear the pointer */
       pp->cache_size = 0; /* zero the size just in case */