diff options
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r-- | plugins/HTTPServer/src/IndexXML.cpp | 2 | ||||
-rw-r--r-- | plugins/HTTPServer/src/MimeHandling.cpp | 7 | ||||
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 10 |
3 files changed, 9 insertions, 10 deletions
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index 15c86c5c40..0297a1f038 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -116,7 +116,7 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, strcpy(szBuffer, "index.xsl");
}
- WriteFile(hFile, szBuffer, strlen(szBuffer), &dwBytesWritten, NULL);
+ WriteFile(hFile, szBuffer, (DWORD)strlen(szBuffer), &dwBytesWritten, NULL);
WriteFile(hFile, szXmlHeader2, sizeof(szXmlHeader2) - 1, &dwBytesWritten, NULL);
diff --git a/plugins/HTTPServer/src/MimeHandling.cpp b/plugins/HTTPServer/src/MimeHandling.cpp index 42964bfeb3..9656753056 100644 --- a/plugins/HTTPServer/src/MimeHandling.cpp +++ b/plugins/HTTPServer/src/MimeHandling.cpp @@ -9,7 +9,6 @@ int bInitMimeHandling() { FILE *mimeDB;
char line[LINE_MAX_SIZE];
char *tok = NULL;
- int lenght;
ContentType *pDBCell = NULL;
ContentTypeDB pDB = NULL;
ExtensionList extListCur = NULL;
@@ -32,10 +31,10 @@ int bInitMimeHandling() { *tok = '\0';
}
/* remove trailing \n */
- lenght = strlen(line);
- if (lenght > 0 && line[lenght - 1] == '\n') {
+ int lenght = (int)strlen(line);
+ if (lenght > 0 && line[lenght - 1] == '\n')
line[lenght - 1] = '\0';
- }
+
/* first token = mime type */
tok = (char*)strtok(line, " \t");
/*create and fill a cell*/
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index f6bd92563a..b59587737e 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -127,7 +127,7 @@ bool bOpenLogFile() { bool bWriteToFile(HANDLE hFile, const char * pszSrc, int nLen = -1) {
if (nLen < 0)
- nLen = strlen(pszSrc);
+ nLen = (int)strlen(pszSrc);
DWORD dwBytesWritten;
return WriteFile(hFile, pszSrc, nLen, &dwBytesWritten, NULL) && (dwBytesWritten == (DWORD)nLen);
}
@@ -162,9 +162,9 @@ void LogEvent(const TCHAR * pszTitle, const char * pszLog) { char szTmp[128];
time_t now;
time(&now);
- int nLen = strftime(szTmp, sizeof(szTmp), "%d-%m-%Y %H:%M:%S -- ", localtime(&now));
+ int nLen = (int)strftime(szTmp, sizeof(szTmp), "%d-%m-%Y %H:%M:%S -- ", localtime(&now));
- int nLogLen = strlen(pszLog);
+ int nLogLen = (int)strlen(pszLog);
while (nLogLen > 0 && (pszLog[nLogLen-1] == '\r' || pszLog[nLogLen-1] == '\n'))
nLogLen--;
@@ -242,7 +242,7 @@ bool bReadConfigurationFile() { // move rest of buffer to front
if (pszCurPos && pszCurPos != szBuf) {
- dwBytesInBuffer = sizeof(szBuf) - (pszCurPos - szBuf);
+ dwBytesInBuffer = DWORD(sizeof(szBuf) - (pszCurPos - szBuf));
memmove(szBuf, pszCurPos, dwBytesInBuffer);
}
@@ -915,7 +915,7 @@ int nSystemShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/) { return 1;
}
- nPluginPathLen = strlen(szPluginPath);
+ nPluginPathLen = (int)strlen(szPluginPath);
sLogFilePath = szPluginPath;
sLogFilePath += "HTTPServer.log";
|