diff options
author | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-07 19:08:41 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@zerotier.com> | 2014-08-07 19:08:41 -0700 |
commit | 77457cbff14546a6b6173a46c0486767dab60847 (patch) | |
tree | b9c5a7453d89678ed46cc51e51c2387c212e8055 /node | |
parent | db0d17cebba67dec344ee63c3b8ecbdc46f2814a (diff) | |
download | infinitytier-77457cbff14546a6b6173a46c0486767dab60847.tar.gz infinitytier-77457cbff14546a6b6173a46c0486767dab60847.zip |
Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after).
Diffstat (limited to 'node')
-rw-r--r-- | node/Network.cpp | 2 | ||||
-rw-r--r-- | node/Utils.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/node/Network.cpp b/node/Network.cpp index 23b32946..c024a54b 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -340,7 +340,7 @@ void Network::threadMain() char fname[1024],lcentry[128]; Utils::snprintf(lcentry,sizeof(lcentry),"_dev_for_%.16llx",(unsigned long long)_id); - EthernetTap *t; + EthernetTap *t = (EthernetTap *)0; try { std::string desiredDevice(_nc->getLocalConfig(lcentry)); _mkNetworkFriendlyName(fname,sizeof(fname)); diff --git a/node/Utils.hpp b/node/Utils.hpp index 0b892cd9..affae9a8 100644 --- a/node/Utils.hpp +++ b/node/Utils.hpp @@ -180,7 +180,7 @@ public: * @return Number of characters actually written */ static unsigned int unhex(const char *hex,unsigned int maxlen,void *buf,unsigned int len); - static inline unsigned int unhex(const std::string &hex,void *buf,unsigned int len) { return unhex(hex.c_str(),hex.length(),buf,len); } + static inline unsigned int unhex(const std::string &hex,void *buf,unsigned int len) { return unhex(hex.c_str(),(unsigned int)hex.length(),buf,len); } /** * Generate secure random bytes |