diff --git a/data/glest_game b/data/glest_game index 3e3e28d1..69b5a991 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 3e3e28d1cbb9a500987811f7f46b06a274b167b1 +Subproject commit 69b5a991e721d6e79c4dc7b364b8bf0ae987c6d1 diff --git a/source/shared_lib/sources/feathery_ftp/ftpAccount.c b/source/shared_lib/sources/feathery_ftp/ftpAccount.c index b6419ddb..dad292ed 100644 --- a/source/shared_lib/sources/feathery_ftp/ftpAccount.c +++ b/source/shared_lib/sources/feathery_ftp/ftpAccount.c @@ -99,7 +99,7 @@ int ftpCreateAccount(const char* name, const char* passw, const char* root, int strncpy(ftpUsers[n].name, name, MAXLEN_USERNAME); strncpy(ftpUsers[n].passw, passw, MAXLEN_PASSWORD); strncpy(ftpUsers[n].ftpRoot, root, MAX_PATH_LEN); - ftpUsers[n].ftpRootLen = strlen(root); + ftpUsers[n].ftpRootLen = (int)strlen(root); ftpUsers[n].accRights = acc; return 0; } diff --git a/source/shared_lib/sources/feathery_ftp/ftpCmds.c b/source/shared_lib/sources/feathery_ftp/ftpCmds.c index c23a00a8..ab0becd6 100644 --- a/source/shared_lib/sources/feathery_ftp/ftpCmds.c +++ b/source/shared_lib/sources/feathery_ftp/ftpCmds.c @@ -60,7 +60,7 @@ LOCAL uint8_t scratchBuf[LEN_SCRATCHBUF]; int ftpSendMsg(msgmode_E mode, int sessionId, int ret, const char* msg) { int sentlen = 0; - int len = strlen(msg); + int len = (int)strlen(msg); char buf[6]; if(mode == MSG_QUOTE) @@ -86,7 +86,7 @@ if(VERBOSE_MODE_ENABLED) printf("%02d <-- %s%s\n", sessionId, buf, msg); int ftpExecTransmission(int sessionId) { int finished = FALSE; - int len; + size_t len; ftpSession_S *pSession = ftpGetSession(sessionId); transmission_S *pTrans = &pSession->activeTrans; int rxLen; @@ -99,8 +99,8 @@ int ftpExecTransmission(int sessionId) len = ftpReadFile(scratchBuf, 1, LEN_SCRATCHBUF, pTrans->fsHandle); if(len > 0) { - pTrans->fileSize -= len; - if(ftpSend(pTrans->dataSocket, scratchBuf, len)) + pTrans->fileSize -= (uint32_t)len; + if(ftpSend(pTrans->dataSocket, scratchBuf, (int)len)) { ftpSendMsg(MSG_NORMAL, sessionId, 426, ftpMsg000); finished = TRUE; @@ -133,12 +133,12 @@ int ftpExecTransmission(int sessionId) break; } - rxLen += len; + rxLen += (int)len; } while(rxLen < LEN_SCRATCHBUF); if(rxLen > 0) { - int res = ftpWriteFile(scratchBuf, 1, rxLen, pTrans->fsHandle); + size_t res = ftpWriteFile(scratchBuf, 1, rxLen, pTrans->fsHandle); if(res != rxLen) { if(VERBOSE_MODE_ENABLED) printf("ERROR in ftpExecTransmission ftpWriteFile returned = %d for sessionId = %d\n",res,sessionId); @@ -999,7 +999,7 @@ int execFtpCmd(int sessionId, const char* cmd, int cmdlen) if(VERBOSE_MODE_ENABLED) printf("About to execute cmds[n].cmdToken [%s] command [%s] for sessionId = %d\n",cmds[n].cmdToken,&cmd[i],sessionId); - ret = cmds[n].handler(sessionId, &cmd[i], strlen(&cmd[i])); // execute command + ret = cmds[n].handler(sessionId, &cmd[i], (int)strlen(&cmd[i])); // execute command if(VERBOSE_MODE_ENABLED) printf("Executed cmds[n].cmdToken [%s] command [%s] ret = %d for sessionId = %d\n",cmds[n].cmdToken,&cmd[i],ret,sessionId); diff --git a/source/shared_lib/sources/feathery_ftp/ftpLib.c b/source/shared_lib/sources/feathery_ftp/ftpLib.c index 47d66d5c..7b81444c 100644 --- a/source/shared_lib/sources/feathery_ftp/ftpLib.c +++ b/source/shared_lib/sources/feathery_ftp/ftpLib.c @@ -36,7 +36,7 @@ */ int ftpRemoveTrailingSlash(char* path) { - int len = strlen(path); + size_t len = strlen(path); if(len > 1) { @@ -44,7 +44,7 @@ int ftpRemoveTrailingSlash(char* path) if(path[len] == '/') path[len] = '\0'; } - return len; + return (int)len; } /** diff --git a/source/shared_lib/sources/feathery_ftp/ftpSession.c b/source/shared_lib/sources/feathery_ftp/ftpSession.c index 2aa96380..31509ecc 100644 --- a/source/shared_lib/sources/feathery_ftp/ftpSession.c +++ b/source/shared_lib/sources/feathery_ftp/ftpSession.c @@ -259,7 +259,7 @@ const char* ftpGetRealPath(int id, const char* path, int normalize) const char *ftp_rootget = ftpGetRoot(sessions[id].userId, &len); snprintf(ftpRoot,2047,"%s",ftp_rootget); - ftpRootLen = strlen(ftpRoot); + ftpRootLen = (int)strlen(ftpRoot); if(ftpRootLen > 0 && ftpRoot[ftpRootLen-1] != '/') { strcat(ftpRoot,"/"); } diff --git a/source/shared_lib/sources/util/conversion.cpp b/source/shared_lib/sources/util/conversion.cpp index 51409f83..67af1064 100644 --- a/source/shared_lib/sources/util/conversion.cpp +++ b/source/shared_lib/sources/util/conversion.cpp @@ -217,11 +217,11 @@ string formatNumber(uint64 f) { string getTimeDuationString(int frames, int updateFps) { int framesleft = frames; - int hours = (int) frames / (float)updateFps / 3600.0; + int hours = (int)((int) frames / (float)updateFps / 3600.0f); framesleft = framesleft - hours * 3600 * updateFps; - int minutes = (int) framesleft / (float)updateFps / 60.0; + int minutes = (int)((int) framesleft / (float)updateFps / 60.0f); framesleft = framesleft - minutes * 60 * updateFps; - int seconds = (int) framesleft / (float)updateFps; + int seconds = (int)((int) framesleft / (float)updateFps); //framesleft=framesleft-seconds*GameConstants::updateFps; string hourstr = intToStr(hours); diff --git a/source/shared_lib/sources/util/string_utils.cpp b/source/shared_lib/sources/util/string_utils.cpp index 194267af..5cb146bd 100644 --- a/source/shared_lib/sources/util/string_utils.cpp +++ b/source/shared_lib/sources/util/string_utils.cpp @@ -88,7 +88,7 @@ namespace Shared { namespace Util { char* ConvertToUTF8(const char* s) { if (NULL != s && *s != '\0') - return ConvertToUTF8(s, strlen(s)); + return ConvertToUTF8(s, (Shared::Platform::uint32)strlen(s)); char* ret = new char[1]; //LOG_ASSERT(NULL != ret); assert(NULL != ret);