- msvc compiler warning cleanup

This commit is contained in:
SoftCoder 2013-12-22 23:58:12 -08:00
parent bcaad53fbe
commit e0c2a388d4
7 changed files with 16 additions and 16 deletions

@ -1 +1 @@
Subproject commit 3e3e28d1cbb9a500987811f7f46b06a274b167b1
Subproject commit 69b5a991e721d6e79c4dc7b364b8bf0ae987c6d1

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}
/**

View File

@ -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,"/");
}

View File

@ -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);

View File

@ -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);