mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
Windows C4267 errors: Fix size_t conversion warnings in windows builds
examples/client.c: examples/coap-rd.c: examples/coap-server.c: include/coap2/block.h: include/coap2/coap_hashkey.h: src/block.c: src/coap_debug.c: src/coap_hashkey.c: src/coap_io.c: src/coap_openssl.c: src/net.c: Fix C4267 windows compilation warnings when using Visual Studio where size_t variable parameters are being converted in both size and sign. There still are some C4116 warnings to fix.
This commit is contained in:
1 parent
636a4df2b5
commit
bb38e995bc
11 files changed
+34
-32
No files matched your search
+1
-1
@@ -723,7 +723,7 @@ get_context(const char *node, const char *port) {
|
||||
|
||||
if (rp->ai_addrlen <= sizeof(addr.addr)) {
|
||||
coap_address_init(&addr);
|
||||
addr.size = rp->ai_addrlen;
|
||||
addr.size = (socklen_t)rp->ai_addrlen;
|
||||
memcpy(&addr.addr, rp->ai_addr, rp->ai_addrlen);
|
||||
addrs = addr;
|
||||
if (addr.addr.sa.sa_family == AF_INET) {
|
||||
|
||||
Reference in new issue
Block a user