From 77457cbff14546a6b6173a46c0486767dab60847 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 7 Aug 2014 19:08:41 -0700 Subject: Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after). --- node/Network.cpp | 2 +- node/Utils.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'node') 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 -- cgit v1.2.3