mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-23 07: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
+2
-2
@@ -26,7 +26,7 @@ int coap_flsll(long long i)
|
||||
#endif
|
||||
|
||||
unsigned int
|
||||
coap_decode_var_bytes(const uint8_t *buf,unsigned int len) {
|
||||
coap_decode_var_bytes(const uint8_t *buf, size_t len) {
|
||||
unsigned int i, n = 0;
|
||||
for (i = 0; i < len; ++i)
|
||||
n = (n << 8) + buf[i];
|
||||
@@ -55,7 +55,7 @@ coap_encode_var_safe(uint8_t *buf, size_t length, unsigned int val) {
|
||||
}
|
||||
|
||||
uint64_t
|
||||
coap_decode_var_bytes8(const uint8_t *buf,unsigned int len) {
|
||||
coap_decode_var_bytes8(const uint8_t *buf, size_t len) {
|
||||
unsigned int i;
|
||||
uint64_t n = 0;
|
||||
for (i = 0; i < len; ++i)
|
||||
|
||||
Reference in new issue
Block a user