]> granicus.if.org Git - curl/commitdiff
conncache: fix compiler warning
authorMarcel Raad <marcelraad@users.sf.net>
Wed, 23 Jul 2014 10:05:47 +0000 (12:05 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 23 Jul 2014 10:06:57 +0000 (12:06 +0200)
warning C4267: '=' : conversion from 'size_t' to 'long', possible loss
of data

The member connection_id of struct connectdata is a long (always a
32-bit signed integer on Visual C++) and the member next_connection_id
of struct conncache is a size_t, so one of them should be changed to
match the other.

This patch the size_t in struct conncache to long (the less invasive
change as that variable is only ever used in a single code line).

Bug: http://curl.haxx.se/bug/view.cgi?id=1399

lib/conncache.h

index 691f061f945bf18720a418cc870e17eb78cf8e09..866554b63b04a4f3cd26f652e1b8913d04d0daf3 100644 (file)
@@ -25,7 +25,7 @@
 struct conncache {
   struct curl_hash *hash;
   size_t num_connections;
-  size_t next_connection_id;
+  long next_connection_id;
 };
 
 struct conncache *Curl_conncache_init(int size);