diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2016-10-31 15:16:42 -0700 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2016-10-31 15:16:42 -0700 |
commit | 965399ba0cd0895db1e592ff6ed43fae6fab5032 (patch) | |
tree | 333271a403063d374e971379deef0d955c46c71a | |
parent | 231cc11a629885b21017ecf40d3544e87650052f (diff) | |
download | infinitytier-965399ba0cd0895db1e592ff6ed43fae6fab5032.tar.gz infinitytier-965399ba0cd0895db1e592ff6ed43fae6fab5032.zip |
fix a few warnings
-rw-r--r-- | osdep/NeighborDiscovery.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/osdep/NeighborDiscovery.cpp b/osdep/NeighborDiscovery.cpp index 68b67794..4f636310 100644 --- a/osdep/NeighborDiscovery.cpp +++ b/osdep/NeighborDiscovery.cpp @@ -28,7 +28,7 @@ namespace ZeroTier { uint16_t calc_checksum (uint16_t *addr, int len) { int count = len; - register uint32_t sum = 0; + uint32_t sum = 0; uint16_t answer = 0; // Sum up 2-byte values until none or only one byte left. @@ -103,7 +103,7 @@ struct _neighbor_solicitation { memcpy(tmp, &ph, sizeof(_pseudo_header)); memcpy(tmp+sizeof(_pseudo_header), this, sizeof(_neighbor_solicitation)); - checksum = calc_checksum((uint16_t*)tmp, len); + checksum = calc_checksum((uint16_t*)tmp, (int)len); free(tmp); tmp = NULL; @@ -145,7 +145,7 @@ struct _neighbor_advertisement { memcpy(tmp, &ph, sizeof(_pseudo_header)); memcpy(tmp+sizeof(_pseudo_header), this, sizeof(_neighbor_advertisement)); - checksum = calc_checksum((uint16_t*)tmp, len); + checksum = calc_checksum((uint16_t*)tmp, (int)len); free(tmp); tmp = NULL; |