Author: tkreuzer
Date: Sat Sep 14 10:25:59 2013
New Revision: 60096
URL:
http://svn.reactos.org/svn/reactos?rev=60096&view=rev
Log:
[SMSS]
Fix some MSVC warnings.
Modified:
trunk/reactos/base/system/smss/pagefile.c
trunk/reactos/base/system/smss/smutil.c
Modified: trunk/reactos/base/system/smss/pagefile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/pagefile.…
==============================================================================
--- trunk/reactos/base/system/smss/pagefile.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/pagefile.c [iso-8859-1] Sat Sep 14 10:25:59 2013
@@ -160,10 +160,10 @@
{
/* Use the rest of the arguments as a maximum size */
SecondArgument.Buffer = &Arguments.Buffer[i];
- SecondArgument.Length = Arguments.Length -
- i * sizeof(WCHAR);
- SecondArgument.MaximumLength = Arguments.MaximumLength -
- i * sizeof(WCHAR);
+ SecondArgument.Length = (USHORT)(Arguments.Length -
+ i * sizeof(WCHAR));
+ SecondArgument.MaximumLength = (USHORT)(Arguments.MaximumLength -
+ i * sizeof(WCHAR));
Status = RtlUnicodeStringToInteger(&SecondArgument, 0,
&MaxSize);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/base/system/smss/smutil.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/smss/smutil.c?…
==============================================================================
--- trunk/reactos/base/system/smss/smutil.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/smss/smutil.c [iso-8859-1] Sat Sep 14 10:25:59 2013
@@ -213,14 +213,14 @@
if (!Token->Buffer) return STATUS_NO_MEMORY;
/* Fill in the unicode string to hold it */
- Token->MaximumLength = TokenLength + sizeof(UNICODE_NULL);
- Token->Length = TokenLength;
+ Token->MaximumLength = (USHORT)(TokenLength + sizeof(UNICODE_NULL));
+ Token->Length = (USHORT)TokenLength;
RtlCopyMemory(Token->Buffer, p, TokenLength);
Token->Buffer[TokenLength / sizeof(WCHAR)] = UNICODE_NULL;
}
/* Modify the input string with the position of where the next token begins */
- Input->Length -= (ULONG_PTR)pp - (ULONG_PTR)Input->Buffer;
+ Input->Length -= (USHORT)((ULONG_PTR)pp - (ULONG_PTR)Input->Buffer);
Input->Buffer = pp;
return STATUS_SUCCESS;
}
@@ -256,7 +256,7 @@
sizeof(L"\\system32;");
RtlInitEmptyUnicodeString(&FullPathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (FullPathString.Buffer)
{
/* Append the root, system32;, and then the current library path */
@@ -308,7 +308,7 @@
Length = PAGE_SIZE;
RtlInitEmptyUnicodeString(&PathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (!PathString.Buffer)
{
/* Fail if we have no memory for this */
@@ -329,7 +329,7 @@
Length = PathString.Length + sizeof(UNICODE_NULL);
RtlInitEmptyUnicodeString(&PathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (!PathString.Buffer)
{
/* Fail if we have no memory for this */