commit 3a1d34c360ca1650136b08ea25156137417a8d7a parent a8880f25ec414c498333e72354de3f18018d5b83 Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Jul 16 15:25:39 +0300 MSVC warnings Diffstat:
http.cc | | | 4 | ++-- |
diff --git a/http.cc b/http.cc @@ -30,13 +30,13 @@ bool dns_first( const char * host, struct sockaddr_storage * address ) { } GetResult http_get( const struct sockaddr_storage & address, const char * host, const char * path, std::string * body, HttpProgressCallback progress_cb, void * cb_data ) { - int sock = socket( address.ss_family, SOCK_STREAM, 0 ); + SOCKET sock = socket( address.ss_family, SOCK_STREAM, 0 ); if( sock == -1 ) { return GET_ERROR_SOCKET; } SCOPE_EXIT( closesocket( sock ) ); - size_t address_size = address.ss_family == AF_INET ? sizeof( sockaddr_in ) : sizeof( sockaddr_in6 ); + int address_size = address.ss_family == AF_INET ? sizeof( sockaddr_in ) : sizeof( sockaddr_in6 ); if( connect( sock, ( const sockaddr * ) &address, address_size ) == -1 ) { return GET_ERROR_CONNECT; }