tstorch / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Avoid level 4 warnings when compiling with MSVC10 #262

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
a.) warning C4245: '=' : conversion from 'int' to 'size_t', signed/unsigned 
mismatch
mongoose.c, mg_get_var(..):
Change len = -1; to len = (size_t)-1;

b.) 'function' : incompatible types - from 'int *' to 'const char *'
mongoose.c, set_ports_option(..):
Change setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &on,... to setsockopt(sock, 
SOL_SOCKET, SO_KEEPALIVE, (const char*)&on,...

c.) 'function' : incompatible types - from 'linger *' to 'const char *'
mongoose.c, close_socket_gracefully(..)
Change setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); to 
setsockopt(sock, SOL_SOCKET, SO_LINGER, (const char*)&linger, sizeof(linger));

Original issue reported on code.google.com by nullable...@gmail.com on 28 Jun 2011 at 11:23

GoogleCodeExporter commented 9 years ago
You can find a propposal here:
http://code.google.com/r/nullabletype-fix-issue-262/

Original comment by nullable...@gmail.com on 29 Sep 2011 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 22 Sep 2012 at 3:05