Author: tkreuzer
Date: Sat Sep 14 10:20:11 2013
New Revision: 60095
URL:
http://svn.reactos.org/svn/reactos?rev=60095&view=rev
Log:
[KERNEL32]
Fix MSVC warnings.
Modified:
trunk/reactos/dll/win32/kernel32/client/console/init.c
trunk/reactos/dll/win32/kernel32/client/console/readwrite.c
trunk/reactos/dll/win32/kernel32/client/environ.c
trunk/reactos/dll/win32/kernel32/client/file/create.c
trunk/reactos/dll/win32/kernel32/client/loader.c
trunk/reactos/dll/win32/kernel32/client/path.c
trunk/reactos/dll/win32/kernel32/client/power.c
trunk/reactos/dll/win32/kernel32/client/proc.c
trunk/reactos/dll/win32/kernel32/client/thread.c
trunk/reactos/dll/win32/kernel32/client/time.c
trunk/reactos/dll/win32/kernel32/client/vdm.c
trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
trunk/reactos/dll/win32/kernel32/winnls/string/nls.c
Modified: trunk/reactos/dll/win32/kernel32/client/console/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/console/init.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/console/init.c [iso-8859-1] Sat Sep 14
10:20:11 2013
@@ -121,7 +121,7 @@
ConsoleStartInfo->dwStartupFlags = si.dwFlags;
if (si.dwFlags & STARTF_USEFILLATTRIBUTE)
{
- ConsoleStartInfo->wFillAttribute = si.dwFillAttribute;
+ ConsoleStartInfo->wFillAttribute = (WORD)si.dwFillAttribute;
}
if (si.dwFlags & STARTF_USECOUNTCHARS)
{
@@ -134,13 +134,13 @@
}
if (si.dwFlags & STARTF_USEPOSITION)
{
- ConsoleStartInfo->dwWindowOrigin.X = (LONG)(si.dwX);
- ConsoleStartInfo->dwWindowOrigin.Y = (LONG)(si.dwY);
+ ConsoleStartInfo->dwWindowOrigin.X = (SHORT)(si.dwX);
+ ConsoleStartInfo->dwWindowOrigin.Y = (SHORT)(si.dwY);
}
if (si.dwFlags & STARTF_USESIZE)
{
- ConsoleStartInfo->dwWindowSize.X = (LONG)(si.dwXSize);
- ConsoleStartInfo->dwWindowSize.Y = (LONG) (si.dwYSize);
+ ConsoleStartInfo->dwWindowSize.X = (SHORT)(si.dwXSize);
+ ConsoleStartInfo->dwWindowSize.Y = (SHORT)(si.dwYSize);
}
/* Set up the title for the console */
Modified: trunk/reactos/dll/win32/kernel32/client/console/readwrite.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/console/readwrite.c [iso-8859-1] Sat Sep 14
10:20:11 2013
@@ -660,7 +660,7 @@
WriteOutputCodeRequest->CodeType = CodeType;
WriteOutputCodeRequest->Coord = dwWriteCoord;
- WriteOutputCodeRequest->Length = nLength;
+ WriteOutputCodeRequest->Length = (USHORT)nLength;
/* Call the server */
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
Modified: trunk/reactos/dll/win32/kernel32/client/environ.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/environ.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/environ.c [iso-8859-1] Sat Sep 14 10:20:11
2013
@@ -50,7 +50,7 @@
if (nSize)
{
/* Keep the given size, minus a NULL-char */
- UniSize = nSize - 1;
+ UniSize = (USHORT)(nSize - 1);
}
else
{
@@ -114,7 +114,7 @@
{
/* Check if the size is too big to fit */
UniSize = UNICODE_STRING_MAX_BYTES - 1;
- if (nSize <= UniSize) UniSize = nSize;
+ if (nSize <= UniSize) UniSize = (USHORT)nSize;
/* Check the size */
Result = RtlUnicodeStringToAnsiSize(&VarValueU);
@@ -169,7 +169,7 @@
{
if (nSize)
{
- UniSize = nSize * sizeof(WCHAR) - sizeof(UNICODE_NULL);
+ UniSize = (USHORT)nSize * sizeof(WCHAR) - sizeof(UNICODE_NULL);
}
else
{
@@ -180,7 +180,7 @@
{
UniSize = UNICODE_STRING_MAX_BYTES - sizeof(UNICODE_NULL);
}
-
+
Status = RtlInitUnicodeStringEx(&VarName, lpName);
if (!NT_SUCCESS(Status))
{
@@ -404,11 +404,11 @@
/* Check if the size is too big to fit */
UniSize = UNICODE_STRING_MAX_CHARS - 2;
- if (nSize <= UniSize) UniSize = nSize;
-
+ if (nSize <= UniSize) UniSize = (USHORT)nSize;
+
/* Clear the input buffer */
if (lpDst) *lpDst = ANSI_NULL;
-
+
/* Initialize all the strings */
RtlInitAnsiString(&Source, lpSrc);
RtlInitUnicodeString(&SourceU, NULL);
@@ -446,7 +446,7 @@
if (!(NT_SUCCESS(Status)) && (Status == STATUS_BUFFER_TOO_SMALL))
{
/* Fixup the length that the API returned */
- DestU.MaximumLength = Length;
+ DestU.MaximumLength = (SHORT)Length;
/* Free old Unicode buffer */
RtlFreeHeap(RtlGetProcessHeap(), 0, DestU.Buffer);
@@ -474,7 +474,7 @@
{
/* Check if the size is too big to fit */
UniSize = UNICODE_STRING_MAX_BYTES - 1;
- if (nSize <= UniSize) UniSize = nSize;
+ if (nSize <= UniSize) UniSize = (USHORT)nSize;
/* Check the size */
Result = RtlUnicodeStringToAnsiSize(&DestU);
@@ -483,7 +483,7 @@
/* Convert the string */
RtlInitEmptyAnsiString(&Dest, lpDst, UniSize);
Status = RtlUnicodeStringToAnsiString(&Dest, &DestU, FALSE);
-
+
/* Write a NULL-char in case of failure only */
if (!NT_SUCCESS(Status)) *lpDst = ANSI_NULL;
}
@@ -517,13 +517,13 @@
UNICODE_STRING Source, Destination;
NTSTATUS Status;
USHORT UniSize;
-
+
UniSize = UNICODE_STRING_MAX_CHARS - 2;
- if (nSize <= UniSize) UniSize = nSize;
+ if (nSize <= UniSize) UniSize = (USHORT)nSize;
RtlInitUnicodeString(&Source, (LPWSTR)lpSrc);
RtlInitEmptyUnicodeString(&Destination, lpDst, UniSize * sizeof(WCHAR));
-
+
Status = RtlExpandEnvironmentStrings_U(NULL,
&Source,
&Destination,
Modified: trunk/reactos/dll/win32/kernel32/client/file/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] Sat Sep 14 10:20:11
2013
@@ -418,7 +418,7 @@
lpReOpenBuff->szPathName,
NULL))
{
- lpReOpenBuff->nErrCode = GetLastError();
+ lpReOpenBuff->nErrCode = (WORD)GetLastError();
return HFILE_ERROR;
}
@@ -492,7 +492,7 @@
if (Len == 0 || Len > OFS_MAXPATHNAME)
{
- lpReOpenBuff->nErrCode = GetLastError();
+ lpReOpenBuff->nErrCode = (WORD)GetLastError();
return (HFILE)INVALID_HANDLE_VALUE;
}
@@ -500,7 +500,7 @@
{
if (!DeleteFileW(PathNameW))
{
- lpReOpenBuff->nErrCode = GetLastError();
+ lpReOpenBuff->nErrCode = (WORD)GetLastError();
return HFILE_ERROR;
}
TRACE("(%s): OF_DELETE return = OK\n", lpFileName);
@@ -546,7 +546,7 @@
RtlFreeHeap(RtlGetProcessHeap(), 0, FileNameString.Buffer);
- lpReOpenBuff->nErrCode = RtlNtStatusToDosError(errCode);
+ lpReOpenBuff->nErrCode = (WORD)RtlNtStatusToDosError(errCode);
if (!NT_SUCCESS(errCode))
{
Modified: trunk/reactos/dll/win32/kernel32/client/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/loader.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/loader.c [iso-8859-1] Sat Sep 14 10:20:11
2013
@@ -552,7 +552,7 @@
}
/* Call unicode API */
- FilenameW.Length = GetModuleFileNameW(hModule, FilenameW.Buffer, nSize) *
sizeof(WCHAR);
+ FilenameW.Length = (USHORT)GetModuleFileNameW(hModule, FilenameW.Buffer, nSize) *
sizeof(WCHAR);
FilenameW.MaximumLength = FilenameW.Length + sizeof(WCHAR);
if (FilenameW.Length)
Modified: trunk/reactos/dll/win32/kernel32/client/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] Sat Sep 14 10:20:11 2013
@@ -557,7 +557,7 @@
IN ULONG Length)
{
BOOLEAN HasExtension;
- WCHAR c;
+ UCHAR c;
NTSTATUS Status;
UNICODE_STRING UnicodeName;
ANSI_STRING AnsiName;
@@ -587,7 +587,7 @@
/* Initialize our two strings */
RtlInitEmptyAnsiString(&AnsiName, AnsiBuffer, MAX_PATH);
- RtlInitEmptyUnicodeString(&UnicodeName, Name, Length * sizeof(WCHAR));
+ RtlInitEmptyUnicodeString(&UnicodeName, Name, (USHORT)Length * sizeof(WCHAR));
UnicodeName.Length = UnicodeName.MaximumLength;
/* Now do the conversion */
@@ -914,7 +914,7 @@
ANSI_STRING AnsiDllDirectory;
ULONG Length;
- RtlInitEmptyAnsiString(&AnsiDllDirectory, lpBuffer, nBufferLength);
+ RtlInitEmptyAnsiString(&AnsiDllDirectory, lpBuffer, (USHORT)nBufferLength);
RtlEnterCriticalSection(&BaseDllDirectoryLock);
@@ -1363,7 +1363,7 @@
}
/* Set the path size now that we have it */
- PathString.MaximumLength = PathString.Length = LengthNeeded * sizeof(WCHAR);
+ PathString.MaximumLength = PathString.Length = (USHORT)LengthNeeded *
sizeof(WCHAR);
/* Request SxS isolation from RtlDosSearchPath_Ustr */
Flags |= 1;
@@ -1377,7 +1377,7 @@
if (nBufferLength <= UNICODE_STRING_MAX_CHARS)
{
/* Add it into the string */
- CallerBuffer.MaximumLength = nBufferLength * sizeof(WCHAR);
+ CallerBuffer.MaximumLength = (USHORT)nBufferLength * sizeof(WCHAR);
}
else
{
@@ -1707,9 +1707,9 @@
if (!PathLength) goto Quickie;
- ShortPathUni.MaximumLength = PathLength * sizeof(WCHAR) + sizeof(UNICODE_NULL);
+ ShortPathUni.MaximumLength = (USHORT)PathLength * sizeof(WCHAR) +
sizeof(UNICODE_NULL);
LongPathUni.Buffer = LongPath;
- LongPathUni.Length = PathLength * sizeof(WCHAR);
+ LongPathUni.Length = (USHORT)PathLength * sizeof(WCHAR);
Status = BasepUnicodeStringTo8BitString(&LongPathAnsi, &LongPathUni, TRUE);
if (!NT_SUCCESS(Status))
@@ -1788,9 +1788,9 @@
if (!PathLength) goto Quickie;
- LongPathUni.MaximumLength = PathLength * sizeof(WCHAR) + sizeof(UNICODE_NULL);
+ LongPathUni.MaximumLength = (USHORT)PathLength * sizeof(WCHAR) +
sizeof(UNICODE_NULL);
ShortPathUni.Buffer = ShortPath;
- ShortPathUni.Length = PathLength * sizeof(WCHAR);
+ ShortPathUni.Length = (USHORT)PathLength * sizeof(WCHAR);
Status = BasepUnicodeStringTo8BitString(&ShortPathAnsi, &ShortPathUni,
TRUE);
if (!NT_SUCCESS(Status))
@@ -2150,8 +2150,8 @@
MaxLength = UNICODE_STRING_MAX_BYTES - 1;
}
- StaticString->Length = RtlGetCurrentDirectory_U(StaticString->MaximumLength,
- StaticString->Buffer);
+ StaticString->Length =
(USHORT)RtlGetCurrentDirectory_U(StaticString->MaximumLength,
+ StaticString->Buffer);
Status = RtlUnicodeToMultiByteSize(&nBufferLength,
StaticString->Buffer,
StaticString->Length);
@@ -2167,7 +2167,7 @@
}
AnsiString.Buffer = lpBuffer;
- AnsiString.MaximumLength = MaxLength;
+ AnsiString.MaximumLength = (USHORT)MaxLength;
Status = BasepUnicodeStringTo8BitString(&AnsiString, StaticString, FALSE);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/dll/win32/kernel32/client/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/power.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/power.c [iso-8859-1] Sat Sep 14 10:20:11 2013
@@ -53,7 +53,7 @@
{
if (Current <= Max)
{
- PowerStatus->BatteryLifePercent = (100 * Current + Max / 2) / Max;
+ PowerStatus->BatteryLifePercent = (UCHAR)((100 * Current + Max / 2) /
Max);
}
else
{
Modified: trunk/reactos/dll/win32/kernel32/client/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/proc.c [iso-8859-1] Sat Sep 14 10:20:11 2013
@@ -102,7 +102,7 @@
/* Allocate buffer for the output string */
Length = CommandLineString.MaximumLength + ApplicationNameString.MaximumLength + 32;
Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length);
- RtlInitEmptyUnicodeString(SubsysCommandLine, Buffer, Length);
+ RtlInitEmptyUnicodeString(SubsysCommandLine, Buffer, (USHORT)Length);
if (!Buffer)
{
/* Fail, no memory */
@@ -2295,7 +2295,8 @@
SECTION_IMAGE_INFORMATION ImageInformation;
IO_STATUS_BLOCK IoStatusBlock;
CLIENT_ID ClientId;
- ULONG NoWindow, RegionSize, StackSize, ImageMachine, ErrorCode, Flags;
+ ULONG NoWindow, RegionSize, StackSize, ErrorCode, Flags;
+ USHORT ImageMachine;
ULONG ParameterFlags, PrivilegeValue, HardErrorMode, ErrorResponse;
ULONG_PTR ErrorParameters[2];
BOOLEAN InJob, SaferNeeded, UseLargePages, HavePrivilege;
@@ -2576,7 +2577,7 @@
}
/* Use the allocated size and convert */
- UnicodeEnv.MaximumLength = RegionSize;
+ UnicodeEnv.MaximumLength = (USHORT)RegionSize;
Status = RtlAnsiStringToUnicodeString(&UnicodeEnv, &AnsiEnv, FALSE);
if (!NT_SUCCESS(Status))
{
@@ -3784,7 +3785,7 @@
/* Set the length */
RtlInitEmptyUnicodeString(&DebuggerString,
DebuggerString.Buffer,
- n);
+ (USHORT)n);
/* Now perform the command line creation */
ImageDbgStatus = RtlAppendUnicodeToString(&DebuggerString,
Modified: trunk/reactos/dll/win32/kernel32/client/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/thread.c [iso-8859-1] Sat Sep 14 10:20:11
2013
@@ -920,7 +920,7 @@
SetThreadUILanguage(IN LANGID LangId)
{
UNIMPLEMENTED;
- return NtCurrentTeb()->CurrentLocale;
+ return (LANGID)NtCurrentTeb()->CurrentLocale;
}
/*
Modified: trunk/reactos/dll/win32/kernel32/client/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] Sat Sep 14 10:20:11 2013
@@ -531,7 +531,7 @@
PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION ProcPerfInfo;
LARGE_INTEGER TotalUserTime, TotalKernTime, TotalIdleTime;
SIZE_T BufferSize, ReturnLength;
- ULONG i;
+ CCHAR i;
NTSTATUS Status;
TotalUserTime.QuadPart = TotalKernTime.QuadPart = TotalIdleTime.QuadPart = 0;
Modified: trunk/reactos/dll/win32/kernel32/client/vdm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/vdm.c [iso-8859-1] Sat Sep 14 10:20:11 2013
@@ -382,8 +382,8 @@
/* Initialize the unicode string to hold it */
EnvironmentSize = (p - NewEnvironment) * sizeof(WCHAR);
- RtlInitEmptyUnicodeString(UnicodeEnv, NewEnvironment, EnvironmentSize);
- UnicodeEnv->Length = EnvironmentSize;
+ RtlInitEmptyUnicodeString(UnicodeEnv, NewEnvironment, (USHORT)EnvironmentSize);
+ UnicodeEnv->Length = (USHORT)EnvironmentSize;
/* Create the ASCII version of it */
Status = RtlUnicodeStringToAnsiString(AnsiEnv, UnicodeEnv, TRUE);
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] Sat Sep 14
10:20:11 2013
@@ -212,7 +212,7 @@
(unicode_caller && format[0] == 'C') ||
(!unicode_caller && format[0] == 'c'))
{
- char ch = arg;
+ char ch = (char)arg;
wstring = HeapAlloc( GetProcessHeap(), 0, 2 * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, &ch, 1, wstring, 1 );
wstring[1] = 0;
@@ -446,9 +446,9 @@
else if (dwFlags & (FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM))
{
if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE)
- from = load_message( (HMODULE)lpSource, dwMessageId, dwLanguageId );
+ from = load_message( (HMODULE)lpSource, dwMessageId, (WORD)dwLanguageId );
if (!from && (dwFlags & FORMAT_MESSAGE_FROM_SYSTEM))
- from = load_message( kernel32_handle, dwMessageId, dwLanguageId );
+ from = load_message( kernel32_handle, dwMessageId, (WORD)dwLanguageId );
if (!from) return 0;
}
else
@@ -549,9 +549,9 @@
else if (dwFlags & (FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM))
{
if (dwFlags & FORMAT_MESSAGE_FROM_HMODULE)
- from = load_message( (HMODULE)lpSource, dwMessageId, dwLanguageId );
+ from = load_message( (HMODULE)lpSource, dwMessageId, (WORD)dwLanguageId );
if (!from && (dwFlags & FORMAT_MESSAGE_FROM_SYSTEM))
- from = load_message( kernel32_handle, dwMessageId, dwLanguageId );
+ from = load_message( kernel32_handle, dwMessageId, (WORD)dwLanguageId );
if (!from) return 0;
}
else
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] Sat Sep 14 10:20:11
2013
@@ -551,10 +551,10 @@
static
INT
-WINAPI
-IntMultiByteToWideCharSYMBOL(DWORD Flags,
+WINAPI
+IntMultiByteToWideCharSYMBOL(DWORD Flags,
LPCSTR MultiByteString,
- INT MultiByteCount,
+ INT MultiByteCount,
LPWSTR WideCharString,
INT WideCharCount)
{
@@ -569,7 +569,7 @@
return 0;
}
- if (WideCharCount == 0)
+ if (WideCharCount == 0)
{
return MultiByteCount;
}
@@ -588,7 +588,7 @@
WideCharString[Count] = Char + 0xf000;
}
}
- if (MultiByteCount > WideCharMaxLen)
+ if (MultiByteCount > WideCharMaxLen)
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
@@ -624,7 +624,7 @@
}
- if (MultiByteCount == 0)
+ if (MultiByteCount == 0)
{
return WideCharCount;
}
@@ -635,11 +635,11 @@
Char = WideCharString[Count];
if (Char < 0x20)
{
- MultiByteString[Count] = Char;
- }
- else
- {
- if ((Char>=0xf020)&&(Char<0xf100))
+ MultiByteString[Count] = (CHAR)Char;
+ }
+ else
+ {
+ if ((Char >= 0xf020) && (Char < 0xf100))
{
MultiByteString[Count] = Char - 0xf000;
}
@@ -650,7 +650,8 @@
}
}
}
- if (WideCharCount > MaxLen)
+
+ if (WideCharCount > MaxLen)
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
return 0;
@@ -1013,7 +1014,7 @@
if (DefaultChar)
DefChar = *DefaultChar;
else
- DefChar = CodePageTable->TransDefaultChar;
+ DefChar = (CHAR)CodePageTable->TransDefaultChar;
/* Convert the WideCharString to the MultiByteString and verify if the
mapping is valid */
for (TempLength = MultiByteCount;
@@ -1259,16 +1260,16 @@
return GetCPFileNameFromRegistry(CodePage, NULL, 0);
}
-static const signed char
-base64inv[] =
-{
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+static const signed char
+base64inv[] =
+{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
- -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
};
@@ -1334,7 +1335,7 @@
}
cchUtf7--;
pch = pszUtf7;
- while(cchUtf7 > 0 && (BYTE) *pszUtf7 < 0x80 &&
+ while(cchUtf7 > 0 && (BYTE) *pszUtf7 < 0x80 &&
base64inv[*pszUtf7] >= 0)
{
cchUtf7--;
@@ -1390,7 +1391,7 @@
}
cchUtf7--;
pch = pszUtf7;
- while(cchUtf7 > 0 && (BYTE) *pszUtf7 < 0x80 &&
+ while(cchUtf7 > 0 && (BYTE) *pszUtf7 < 0x80 &&
base64inv[*pszUtf7] >= 0)
{
cchUtf7--;
@@ -2166,5 +2167,5 @@
STUB;
return TRUE;
}
-
+
/* EOF */