浏览代码

Warning removal.

Adam Ierymenko 7 年之前
父节点
当前提交
0d8e134f9f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      osdep/OSUtils.cpp

+ 2 - 2
osdep/OSUtils.cpp

@@ -381,7 +381,7 @@ std::vector<std::string> OSUtils::split(const char *s,const char *const sep,cons
 std::string OSUtils::platformDefaultHomePath()
 std::string OSUtils::platformDefaultHomePath()
 {
 {
 #ifdef __QNAP__
 #ifdef __QNAP__
-	char *cmd = "/sbin/getcfg ZeroTier Install_Path -f /etc/config/qpkg.conf";    
+	char *cmd = "/sbin/getcfg ZeroTier Install_Path -f /etc/config/qpkg.conf";
     char buf[128];
     char buf[128];
     FILE *fp;
     FILE *fp;
     if ((fp = popen(cmd, "r")) == NULL) {
     if ((fp = popen(cmd, "r")) == NULL) {
@@ -494,7 +494,7 @@ std::string OSUtils::jsonBinFromHex(const nlohmann::json &jv)
 {
 {
 	std::string s(jsonString(jv,""));
 	std::string s(jsonString(jv,""));
 	if (s.length() > 0) {
 	if (s.length() > 0) {
-		unsigned int buflen = (s.length() / 2) + 1;
+		unsigned int buflen = (unsigned int)((s.length() / 2) + 1);
 		char *buf = new char[buflen];
 		char *buf = new char[buflen];
 		try {
 		try {
 			unsigned int l = Utils::unhex(s.c_str(),buf,buflen);
 			unsigned int l = Utils::unhex(s.c_str(),buf,buflen);