diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-08-14 11:43:39 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-08-14 11:43:39 -0700 |
| commit | a4bc40542bf11a6688b5e0e8aa0e06a7bc4fe544 (patch) | |
| tree | 0eecce2e2d7bcca9c9a2d16493b493579a14fd2b /node | |
| parent | ee1dc16e8ffc5c5cc8f3b5da97cf2d01c7604ab7 (diff) | |
| download | infinitytier-a4bc40542bf11a6688b5e0e8aa0e06a7bc4fe544.tar.gz infinitytier-a4bc40542bf11a6688b5e0e8aa0e06a7bc4fe544.zip | |
GCC/G++ build fixes, GitHub issue #563
Diffstat (limited to 'node')
| -rw-r--r-- | node/AtomicCounter.hpp | 2 | ||||
| -rw-r--r-- | node/Node.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/node/AtomicCounter.hpp b/node/AtomicCounter.hpp index abb342fe..34b58e91 100644 --- a/node/AtomicCounter.hpp +++ b/node/AtomicCounter.hpp @@ -50,7 +50,7 @@ public: inline int load() const { #ifdef __GNUC__ - return __sync_or_and_fetch(&_v,0); + return __sync_or_and_fetch(const_cast<int *>(&_v),0); #else return _v.load(); #endif diff --git a/node/Node.cpp b/node/Node.cpp index 0df3a97a..366ddbf0 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -100,7 +100,7 @@ Node::Node(void *uptr,void *tptr,const struct ZT_Node_Callbacks *callbacks,uint6 } else { idtmp[0] = RR->identity.address().toInt(); idtmp[1] = 0; n = stateObjectGet(tptr,ZT_STATE_OBJECT_IDENTITY_PUBLIC,idtmp,tmp,sizeof(tmp) - 1); - if ((n > 0)&&(n < sizeof(RR->publicIdentityStr))&&(n < sizeof(tmp))) { + if ((n > 0)&&(n < (int)sizeof(RR->publicIdentityStr))&&(n < (int)sizeof(tmp))) { if (memcmp(tmp,RR->publicIdentityStr,n)) stateObjectPut(tptr,ZT_STATE_OBJECT_IDENTITY_PUBLIC,idtmp,RR->publicIdentityStr,(unsigned int)strlen(RR->publicIdentityStr)); } |
