mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-22 23:35:13 +03:00
variables: Remove size changing warnings when using Visual Studio
Change some of the types of variables, and cast change sizes where known to be safe. There still are some C4116 warning and a couple of C4090 warning which are OK, so disabled by a #pragma.
This commit is contained in:
1 parent
0044c61fab
commit
640bb4e667
17 files changed
+65
-54
No files matched your search
@@ -18,6 +18,7 @@
|
||||
#ifdef _WIN32
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#define fileno _fileno
|
||||
#include "getopt.c"
|
||||
#if !defined(S_ISDIR)
|
||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
|
||||
@@ -631,7 +631,7 @@ resolve_address(const coap_str_const_t *server, struct sockaddr *dst) {
|
||||
switch (ainfo->ai_family) {
|
||||
case AF_INET6:
|
||||
case AF_INET:
|
||||
len = ainfo->ai_addrlen;
|
||||
len = (int)ainfo->ai_addrlen;
|
||||
memcpy(dst, ainfo->ai_addr, len);
|
||||
goto finish;
|
||||
default:
|
||||
@@ -2898,6 +2898,9 @@ main(int argc, char **argv) {
|
||||
free(proxy_list);
|
||||
proxy_list = NULL;
|
||||
proxy_list_count = 0;
|
||||
#ifdef _WIN32
|
||||
#pragma warning( disable : 4090 )
|
||||
#endif
|
||||
coap_free(proxy_host_name_list);
|
||||
#endif /* SERVER_CAN_PROXY */
|
||||
|
||||
|
||||
Reference in new issue
Block a user