Skip to content

Commit

Permalink
conncache: fix compiler warning
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Marcel Raad authored and bagder committed Jul 23, 2014
1 parent 05a887e commit 2cd0c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/conncache.h
Expand Up @@ -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);
Expand Down

0 comments on commit 2cd0c2d

Please sign in to comment.