mirror of
https://github.com/bobranten/Ext4Fsd.git
synced 2025-10-30 13:28:31 -05:00
added some typecasts to avoid compiler warnings
This commit is contained in:
@@ -1328,7 +1328,7 @@ Ext2Open(
|
|||||||
memset(UnicodeName, 0, sizeof(SHORT) * MAX_PATH);
|
memset(UnicodeName, 0, sizeof(SHORT) * MAX_PATH);
|
||||||
memset(AnsiName, 0, sizeof(UCHAR) * MAX_PATH);
|
memset(AnsiName, 0, sizeof(UCHAR) * MAX_PATH);
|
||||||
|
|
||||||
NameLength = strlen(FileName);
|
NameLength = (USHORT)strlen(FileName);
|
||||||
ASSERT(NameLength < MAX_PATH);
|
ASSERT(NameLength < MAX_PATH);
|
||||||
|
|
||||||
if (FileName[0] == '\\') {
|
if (FileName[0] == '\\') {
|
||||||
@@ -4500,7 +4500,7 @@ Ext2AnsiToUnicode(
|
|||||||
|
|
||||||
memset(UniName, 0, sizeof(WCHAR) * UniLength);
|
memset(UniName, 0, sizeof(WCHAR) * UniLength);
|
||||||
|
|
||||||
NameLength = strlen(AnsiName);
|
NameLength = (USHORT)strlen(AnsiName);
|
||||||
ASSERT(NameLength < UniLength);
|
ASSERT(NameLength < UniLength);
|
||||||
|
|
||||||
AnsiFilespec.MaximumLength = AnsiFilespec.Length = NameLength;
|
AnsiFilespec.MaximumLength = AnsiFilespec.Length = NameLength;
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ BOOLEAN Ext2QueryDrive(PPIPE_REQ *pr, ULONG len)
|
|||||||
rc = QueryDosDeviceA(devPath, s, l);
|
rc = QueryDosDeviceA(devPath, s, l);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
q->result = 1;
|
q->result = 1;
|
||||||
p->len = sizeof(PIPE_REQ) + sizeof(REQ_QUERY_DRV) + strlen(s) + 1;
|
p->len = (int)(sizeof(PIPE_REQ) + sizeof(REQ_QUERY_DRV) + strlen(s) + 1);
|
||||||
} else {
|
} else {
|
||||||
q->result = 0;
|
q->result = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ void Ext2Log(DWORD ll, char *fn, int ln, char *format, ... )
|
|||||||
GetLocalTime(&st);
|
GetLocalTime(&st);
|
||||||
sprintf_s(s, 256, "%2.2u:%2.2u:%2.2u (%x): ", st.wHour,
|
sprintf_s(s, 256, "%2.2u:%2.2u:%2.2u (%x): ", st.wHour,
|
||||||
st.wMinute, st.wSecond, GetCurrentThreadId());
|
st.wMinute, st.wSecond, GetCurrentThreadId());
|
||||||
i = strlen(s);
|
i = (int)strlen(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write user message to buffer s */
|
/* write user message to buffer s */
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ errorout:
|
|||||||
TCHAR *
|
TCHAR *
|
||||||
Ext2StrStr(TCHAR *s, TCHAR *t)
|
Ext2StrStr(TCHAR *s, TCHAR *t)
|
||||||
{
|
{
|
||||||
int ls = _tcslen(s), lt = _tcslen(t), i;
|
int ls = (int)_tcslen(s), lt = (int)_tcslen(t), i;
|
||||||
for (i = 0; i + lt <= ls; i++) {
|
for (i = 0; i + lt <= ls; i++) {
|
||||||
if (0 == _tcsnicmp(&s[i], t, lt))
|
if (0 == _tcsnicmp(&s[i], t, lt))
|
||||||
return &s[i];
|
return &s[i];
|
||||||
@@ -159,7 +159,7 @@ TCHAR * Ext2BuildUsrCMD(TCHAR *task)
|
|||||||
if (p)
|
if (p)
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
len = (int)_tcslen(cmd) + 10 + _tcslen(task);
|
len = (int)_tcslen(cmd) + 10 + (int)_tcslen(task);
|
||||||
refresh = new TCHAR[len];
|
refresh = new TCHAR[len];
|
||||||
if (!refresh)
|
if (!refresh)
|
||||||
goto errorout;
|
goto errorout;
|
||||||
|
|||||||
Reference in New Issue
Block a user