Author: ion
Date: Thu Oct 26 05:49:51 2006
New Revision: 24657
URL:
http://svn.reactos.org/svn/reactos?rev=24657&view=rev
Log:
- Fix dozens of missing typecast errors.
- Other MSVC/WDK compatibility fixes.
Modified:
trunk/reactos/include/ndk/exfuncs.h
trunk/reactos/include/ndk/extypes.h
trunk/reactos/include/ndk/halfuncs.h
trunk/reactos/include/ndk/iofuncs.h
trunk/reactos/include/ndk/obfuncs.h
trunk/reactos/include/psdk/winnt.h
trunk/reactos/ntoskrnl/cc/view.c
trunk/reactos/ntoskrnl/cm/regobj.c
trunk/reactos/ntoskrnl/deprecated/irq.c
trunk/reactos/ntoskrnl/ex/locale.c
trunk/reactos/ntoskrnl/ex/sysinfo.c
trunk/reactos/ntoskrnl/fs/name.c
trunk/reactos/ntoskrnl/fs/util.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
trunk/reactos/ntoskrnl/ke/i386/kiinit.c
trunk/reactos/ntoskrnl/ke/i386/v86vdm.c
trunk/reactos/ntoskrnl/ke/thrdschd.c
trunk/reactos/ntoskrnl/ldr/loader.c
trunk/reactos/ntoskrnl/lpc/reply.c
trunk/reactos/ntoskrnl/mm/pagefile.c
trunk/reactos/ntoskrnl/ob/obdir.c
trunk/reactos/ntoskrnl/ob/obinit.c
trunk/reactos/ntoskrnl/ob/oblife.c
trunk/reactos/ntoskrnl/ob/symlink.c
trunk/reactos/ntoskrnl/ps/process.c
trunk/reactos/ntoskrnl/ps/security.c
trunk/reactos/ntoskrnl/rtl/libsupp.c
trunk/reactos/ntoskrnl/rtl/misc.c
trunk/reactos/ntoskrnl/se/sd.c
trunk/reactos/ntoskrnl/se/semgr.c
trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/include/ndk/exfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/exfuncs.h (original)
+++ trunk/reactos/include/ndk/exfuncs.h Thu Oct 26 05:49:51 2006
@@ -91,6 +91,15 @@
ExfUnblockPushLock(
PEX_PUSH_LOCK PushLock,
PVOID CurrentWaitBlock
+);
+
+//
+// Resource Functions
+//
+BOOLEAN
+NTAPI
+ExTryToAcquireResourceExclusiveLite(
+ IN PERESOURCE Resource
);
#endif
Modified: trunk/reactos/include/ndk/extypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/extypes.h (original)
+++ trunk/reactos/include/ndk/extypes.h Thu Oct 26 05:49:51 2006
@@ -104,6 +104,13 @@
#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
SYNCHRONIZE | \
MUTANT_QUERY_STATE)
+
+#define TIMER_QUERY_STATE 0x0001
+#define TIMER_MODIFY_STATE 0x0002
+#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
+ SYNCHRONIZE | \
+ TIMER_QUERY_STATE | \
+ TIMER_MODIFY_STATE)
#endif
//
Modified: trunk/reactos/include/ndk/halfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/halfuncs.h (original)
+++ trunk/reactos/include/ndk/halfuncs.h Thu Oct 26 05:49:51 2006
@@ -31,8 +31,10 @@
// The DDK steals these away from you.
//
#ifdef _MSC_VER
-//#pragma intrinsic(_enable)
-//#pragma intrinsic(_disable)
+void _enable(void);
+void _disable(void);
+#pragma intrinsic(_enable)
+#pragma intrinsic(_disable)
#endif
//
@@ -208,5 +210,12 @@
IN PTIME_FIELDS RtcTime
);
-#endif
-#endif
+NTHALAPI
+VOID
+NTAPI
+HalSetRealTimeClock(
+ IN PTIME_FIELDS RtcTime
+);
+
+#endif
+#endif
Modified: trunk/reactos/include/ndk/iofuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/iofuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/iofuncs.h (original)
+++ trunk/reactos/include/ndk/iofuncs.h Thu Oct 26 05:49:51 2006
@@ -671,7 +671,6 @@
IN ULONG OutputBufferSize
);
-#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
@@ -679,7 +678,6 @@
IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock
);
-#endif
NTSYSAPI
NTSTATUS
Modified: trunk/reactos/include/ndk/obfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/obfuncs.h (original)
+++ trunk/reactos/include/ndk/obfuncs.h Thu Oct 26 05:49:51 2006
@@ -29,6 +29,16 @@
//
// Object Functions
//
+NTKERNELAPI
+NTSTATUS
+NTAPI
+ObAssignSecurity(
+ IN PACCESS_STATE AccessState,
+ IN PSECURITY_DESCRIPTOR SecurityDescriptor,
+ IN PVOID Object,
+ IN POBJECT_TYPE Type
+);
+
NTKERNELAPI
NTSTATUS
NTAPI
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=2…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h (original)
+++ trunk/reactos/include/psdk/winnt.h Thu Oct 26 05:49:51 2006
@@ -478,10 +478,10 @@
#ifndef __NTDDK_H
#define MUTANT_QUERY_STATE 0x0001
#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
-#endif
#define TIMER_QUERY_STATE 0x0001
#define TIMER_MODIFY_STATE 0x0002
#define
TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|TIMER_QUERY_STATE|TIMER_MODIFY_STATE)
+#endif
/*
* To prevent gcc compiler warnings, bracket these defines when initialising
* a SID_IDENTIFIER_AUTHORITY, eg.
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=246…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c (original)
+++ trunk/reactos/ntoskrnl/cc/view.c Thu Oct 26 05:49:51 2006
@@ -358,7 +358,7 @@
for (i = 0; i < current->Bcb->CacheSegmentSize / PAGE_SIZE; i++)
{
PFN_TYPE Page;
- Page = MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart
>> PAGE_SHIFT;
+ Page = (PFN_TYPE)(MmGetPhysicalAddress((char*)current->BaseAddress + i *
PAGE_SIZE).QuadPart >> PAGE_SHIFT);
Status = MmPageOutPhysicalAddress(Page);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/ntoskrnl/cm/regobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/cm/regobj.c (original)
+++ trunk/reactos/ntoskrnl/cm/regobj.c Thu Oct 26 05:49:51 2006
@@ -276,8 +276,8 @@
Length = wcslen(StartPtr);
- KeyName.Length = Length * sizeof(WCHAR);
- KeyName.MaximumLength = KeyName.Length + sizeof(WCHAR);
+ KeyName.Length = (USHORT)Length * sizeof(WCHAR);
+ KeyName.MaximumLength = (USHORT)KeyName.Length + sizeof(WCHAR);
KeyName.Buffer = ExAllocatePool(NonPagedPool,
KeyName.MaximumLength);
RtlCopyMemory(KeyName.Buffer,
@@ -751,7 +751,7 @@
{
ObjectNameInfo->Name.Buffer = (PWCHAR)(ObjectNameInfo + 1);
ObjectNameInfo->Name.Length = 0;
- ObjectNameInfo->Name.MaximumLength = Length - sizeof(OBJECT_NAME_INFORMATION);
+ ObjectNameInfo->Name.MaximumLength = (USHORT)Length -
sizeof(OBJECT_NAME_INFORMATION);
}
@@ -931,13 +931,13 @@
if (TargetPath->Buffer == NULL && TargetPath->MaximumLength == 0)
{
TargetPath->Length = 0;
- TargetPath->MaximumLength = ValueCell->DataSize + sizeof(WCHAR);
+ TargetPath->MaximumLength = (USHORT)ValueCell->DataSize + sizeof(WCHAR);
TargetPath->Buffer = ExAllocatePool(NonPagedPool,
TargetPath->MaximumLength);
}
- TargetPath->Length = min(TargetPath->MaximumLength - sizeof(WCHAR),
- (ULONG) ValueCell->DataSize);
+ TargetPath->Length = min((USHORT)TargetPath->MaximumLength - sizeof(WCHAR),
+ (USHORT)ValueCell->DataSize);
if (ValueCell->DataSize > 0)
{
Modified: trunk/reactos/ntoskrnl/deprecated/irq.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/deprecated/irq.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/deprecated/irq.c (original)
+++ trunk/reactos/ntoskrnl/deprecated/irq.c Thu Oct 26 05:49:51 2006
@@ -512,7 +512,7 @@
DPRINT("PID: %d, TID: %d CS %04x/%04x\n",
((PETHREAD)CurrentThread)->ThreadsProcess->UniqueProcessId,
((PETHREAD)CurrentThread)->Cid.UniqueThread,
- Trapframe->SegCs,
+ Trapframe->Cs,
CurrentThread->TrapFrame ? CurrentThread->TrapFrame->SegCs :
0);
if (CurrentThread->TrapFrame == NULL)
{
Modified: trunk/reactos/ntoskrnl/ex/locale.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/locale.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/locale.c (original)
+++ trunk/reactos/ntoskrnl/ex/locale.c Thu Oct 26 05:49:51 2006
@@ -80,7 +80,7 @@
if (NT_SUCCESS(Status))
{
/* Return the language */
- *LanguageId = Value;
+ *LanguageId = (USHORT)Value;
}
}
else
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c Thu Oct 26 05:49:51 2006
@@ -71,7 +71,7 @@
ScaledIdle = Prcb->IdleThread->KernelTime * 100;
TotalTime = Prcb->KernelTime + Prcb->UserTime;
if (TotalTime != 0)
- *CpuUsage = 100 - (ScaledIdle / TotalTime);
+ *CpuUsage = (ULONG)(100 - (ScaledIdle / TotalTime));
else
*CpuUsage = 0;
}
@@ -211,7 +211,9 @@
/*
* Get the environment variable
*/
- Result = HalGetEnvironmentVariable(AName.Buffer, ValueBufferLength, Value);
+ Result = HalGetEnvironmentVariable(AName.Buffer,
+ (USHORT)ValueBufferLength,
+ Value);
if(!Result)
{
RtlFreeAnsiString(&AName);
Modified: trunk/reactos/ntoskrnl/fs/name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fs/name.c?rev=246…
==============================================================================
--- trunk/reactos/ntoskrnl/fs/name.c (original)
+++ trunk/reactos/ntoskrnl/fs/name.c Thu Oct 26 05:49:51 2006
@@ -297,13 +297,13 @@
}
/* Now we have the First Part */
- FirstPart->Length = (i-FirstLoop);
+ FirstPart->Length = (USHORT)(i - FirstLoop);
FirstPart->MaximumLength = FirstPart->Length; /* +2?? */
FirstPart->Buffer = &Name.Buffer[FirstLoop];
/* Make the second part if something is still left */
if (i<Name.Length) {
- RemainingPart->Length = (Name.Length - (i+1));
+ RemainingPart->Length = (USHORT)(Name.Length - (i+1));
RemainingPart->MaximumLength = RemainingPart->Length; /* +2?? */
RemainingPart->Buffer = &Name.Buffer[i+1];
}
Modified: trunk/reactos/ntoskrnl/fs/util.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fs/util.c?rev=246…
==============================================================================
--- trunk/reactos/ntoskrnl/fs/util.c (original)
+++ trunk/reactos/ntoskrnl/fs/util.c Thu Oct 26 05:49:51 2006
@@ -42,8 +42,10 @@
ULONG i;
/* Allocate the Resource Buffer */
- FsRtlpResources = FsRtlAllocatePool(NonPagedPool,
- FSRTL_MAX_RESOURCES*sizeof(ERESOURCE));
+ FsRtlpResources = FsRtlAllocatePoolWithTag(NonPagedPool,
+ FSRTL_MAX_RESOURCES *
+ sizeof(ERESOURCE),
+ TAG('F', 's', 'R',
'e'));
/* Initialize the Resources */
for (i = 0; i < FSRTL_MAX_RESOURCES; i++)
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Thu Oct 26 05:49:51 2006
@@ -593,7 +593,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
KeyName.Length = 0;
- KeyName.MaximumLength = KeyNameLength;
+ KeyName.MaximumLength = (USHORT)KeyNameLength;
KeyName.Buffer = KeyNameBuffer;
/*
@@ -619,7 +619,7 @@
ExFreePool(KeyNameBuffer);
return Status;
}
- KeyName.Length += DriverKeyLength - sizeof(UNICODE_NULL);
+ KeyName.Length += (USHORT)DriverKeyLength - sizeof(UNICODE_NULL);
}
else
{
@@ -750,7 +750,7 @@
sizeof(GUID));
/* The new entry is the index */
- FoundIndex = IopBusTypeGuidList->GuidCount;
+ FoundIndex = (USHORT)IopBusTypeGuidList->GuidCount;
IopBusTypeGuidList->GuidCount++;
Quickie:
@@ -928,7 +928,7 @@
Irp->IoStatus.Information = 0;
IrpSp = IoGetNextIrpStackLocation(Irp);
- IrpSp->MinorFunction = MinorFunction;
+ IrpSp->MinorFunction = (UCHAR)MinorFunction;
if (Stack)
{
@@ -1618,14 +1618,14 @@
Status = STATUS_UNSUCCESSFUL;
else
{
- KeyValue.Length = KeyValue.MaximumLength =
ParentIdPrefixInformation->DataLength;
+ KeyValue.Length = KeyValue.MaximumLength =
(USHORT)ParentIdPrefixInformation->DataLength;
KeyValue.Buffer = (PWSTR)ParentIdPrefixInformation->Data;
}
goto cleanup;
}
if (Status != STATUS_OBJECT_NAME_NOT_FOUND)
{
- KeyValue.Length = KeyValue.MaximumLength =
ParentIdPrefixInformation->DataLength;
+ KeyValue.Length = KeyValue.MaximumLength =
(USHORT)ParentIdPrefixInformation->DataLength;
KeyValue.Buffer = (PWSTR)ParentIdPrefixInformation->Data;
goto cleanup;
}
@@ -2711,7 +2711,7 @@
IndexDevice++;
/* Open device key */
- DeviceName.Length = DeviceName.MaximumLength = pDeviceInformation->NameLength;
+ DeviceName.Length = DeviceName.MaximumLength =
(USHORT)pDeviceInformation->NameLength;
DeviceName.Buffer = pDeviceInformation->Name;
InitializeObjectAttributes(&ObjectAttributes, &DeviceName,
OBJ_KERNEL_HANDLE, hDevicesKey, NULL);
Status = ZwOpenKey(
@@ -2832,7 +2832,7 @@
goto cleanup;
}
IndexSubKey++;
- DeviceName.Length = DeviceName.MaximumLength =
pDeviceInformation->NameLength;
+ DeviceName.Length = DeviceName.MaximumLength =
(USHORT)pDeviceInformation->NameLength;
DeviceName.Buffer = pDeviceInformation->Name;
Status = IopEnumerateDetectedDevices(
@@ -2878,7 +2878,7 @@
else
{
/* Assign hardware id to this device */
- ValueName.Length = ValueName.MaximumLength = pValueInformation->DataLength;
+ ValueName.Length = ValueName.MaximumLength =
(USHORT)pValueInformation->DataLength;
ValueName.Buffer = (PWCHAR)pValueInformation->Data;
if (ValueName.Length >= sizeof(WCHAR) &&
ValueName.Buffer[ValueName.Length / sizeof(WCHAR) - 1] == UNICODE_NULL)
ValueName.Length -= sizeof(WCHAR);
Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Thu Oct 26 05:49:51 2006
@@ -438,21 +438,21 @@
LdrInit1();
/* Set the NX Support policy */
- SharedUserData->NXSupportPolicy = NXSupportPolicy;
+ SharedUserData->NXSupportPolicy = (UCHAR)NXSupportPolicy;
/* Set basic CPU Features that user mode can read */
SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] =
- (KeFeatureBits & KF_MMX);
+ (KeFeatureBits & KF_MMX) ? TRUE: FALSE;
SharedUserData->ProcessorFeatures[PF_COMPARE_EXCHANGE_DOUBLE] =
- (KeFeatureBits & KF_CMPXCHG8B);
+ (KeFeatureBits & KF_CMPXCHG8B) ? TRUE: FALSE;
SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] =
- ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI));
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI)) ? TRUE:
FALSE;
SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] =
- ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI64));
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI64)) ?
TRUE: FALSE;
SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
- (KeFeatureBits & KF_3DNOW);
+ (KeFeatureBits & KF_3DNOW) ? TRUE: FALSE;
SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] =
- (KeFeatureBits & KF_RDTSC);
+ (KeFeatureBits & KF_RDTSC) ? TRUE: FALSE;
/* Set up the thread-related fields in the PRCB */
Prcb->CurrentThread = InitThread;
@@ -514,7 +514,7 @@
{
KDESCRIPTOR GdtDescriptor, IdtDescriptor;
KGDTENTRY TssSelector, PcrSelector;
- ULONG Tr, Fs;
+ USHORT Tr, Fs;
/* Get GDT and IDT descriptors */
Ke386GetGlobalDescriptorTable(GdtDescriptor);
@@ -666,7 +666,7 @@
InitialThread,
(PVOID)InitialStack,
(PKPRCB)__readfsdword(KPCR_PRCB),
- Cpu,
+ (CCHAR)Cpu,
KeLoaderBlock);
/* Set the priority of this thread to 0 */
Modified: trunk/reactos/ntoskrnl/ke/i386/v86vdm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/v86vdm.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/v86vdm.c (original)
+++ trunk/reactos/ntoskrnl/ke/i386/v86vdm.c Thu Oct 26 05:49:51 2006
@@ -94,8 +94,8 @@
/* Save the old offset and base, and set the new ones */
OldOffset = Process->IopmOffset;
OldBase = Tss->IoMapBase;
- Process->IopmOffset = IOPM_OFFSET;
- Tss->IoMapBase = IOPM_OFFSET;
+ Process->IopmOffset = (USHORT)IOPM_OFFSET;
+ Tss->IoMapBase = (USHORT)IOPM_OFFSET;
/* Switch stacks and work the magic */
Ki386SetupAndExitToV86Mode(VdmTeb);
Modified: trunk/reactos/ntoskrnl/ke/thrdschd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdschd.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/thrdschd.c (original)
+++ trunk/reactos/ntoskrnl/ke/thrdschd.c Thu Oct 26 05:49:51 2006
@@ -281,7 +281,7 @@
* due to the current ""scheduler"" in ROS, it
can't be done
* cleanly since it actualyl dispatches threads instead.
*/
- Thread->Priority = Priority;
+ Thread->Priority = (SCHAR)Priority;
}
else
{
@@ -310,7 +310,7 @@
if (OldPriority != Priority)
{
/* Set it */
- Thread->Priority = Priority;
+ Thread->Priority = (SCHAR)Priority;
/* Choose action based on thread's state */
if (Thread->State == Ready)
@@ -383,7 +383,7 @@
{
KAFFINITY OldAffinity;
ULONG ProcessorMask;
- ULONG i;
+ CCHAR i;
PKPCR Pcr;
/* Make sure that the affinity is valid */
Modified: trunk/reactos/ntoskrnl/ldr/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ldr/loader.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ldr/loader.c (original)
+++ trunk/reactos/ntoskrnl/ldr/loader.c Thu Oct 26 05:49:51 2006
@@ -1145,7 +1145,7 @@
RtlCopyMemory(NameBuffer, Module->FullDllName.Buffer, PathLength);
RtlCopyMemory(NameBuffer + (PathLength / sizeof(WCHAR)), DriverName.Buffer,
DriverName.Length);
NameString.Buffer = NameBuffer;
- NameString.MaximumLength = NameString.Length = PathLength +
DriverName.Length;
+ NameString.MaximumLength = NameString.Length = (USHORT)PathLength +
DriverName.Length;
/* NULL-terminate */
NameString.MaximumLength += sizeof(WCHAR);
Modified: trunk/reactos/ntoskrnl/lpc/reply.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/reply.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/lpc/reply.c (original)
+++ trunk/reactos/ntoskrnl/lpc/reply.c Thu Oct 26 05:49:51 2006
@@ -65,7 +65,7 @@
MessageReply->Message.ClientId.UniqueProcess = PsGetCurrentProcessId();
MessageReply->Message.ClientId.UniqueThread = PsGetCurrentThreadId();
- MessageReply->Message.u2.s2.Type = MessageType;
+ MessageReply->Message.u2.s2.Type = (CSHORT)MessageType;
MessageReply->Message.MessageId = InterlockedIncrementUL(&LpcpNextMessageId);
KeAcquireSpinLock(&Port->Lock, &oldIrql);
@@ -276,7 +276,7 @@
CRequest = (PEPORT_CONNECT_REQUEST_MESSAGE)&Request->Message;
memcpy(&Header, &Request->Message, sizeof(PORT_MESSAGE));
- Header.u1.s1.DataLength = CRequest->ConnectDataLength;
+ Header.u1.s1.DataLength = (CSHORT)CRequest->ConnectDataLength;
Header.u1.s1.TotalLength = Header.u1.s1.DataLength + sizeof(PORT_MESSAGE);
if (PreviousMode != KernelMode)
Modified: trunk/reactos/ntoskrnl/mm/pagefile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/pagefile.c (original)
+++ trunk/reactos/ntoskrnl/mm/pagefile.c Thu Oct 26 05:49:51 2006
@@ -586,7 +586,7 @@
RetrievalPointers = PagingFileList[MmCoreDumpPageFile]->RetrievalPointers;
/* Dump the header. */
- MdlMap[0] = MmGetPhysicalAddress(MmCoreDumpPageFrame).QuadPart >> PAGE_SHIFT;
+ MdlMap[0] = (ULONG)(MmGetPhysicalAddress(MmCoreDumpPageFrame).QuadPart >>
PAGE_SHIFT);
#if defined(__GNUC__)
DiskOffset = MmGetOffsetPageFile(RetrievalPointers, (LARGE_INTEGER)0LL);
Modified: trunk/reactos/ntoskrnl/ob/obdir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obdir.c (original)
+++ trunk/reactos/ntoskrnl/ob/obdir.c Thu Oct 26 05:49:51 2006
@@ -163,7 +163,7 @@
/* Save the result */
Context->HashValue = HashValue;
- Context->HashIndex = HashIndex;
+ Context->HashIndex = (USHORT)HashIndex;
/* Get the root entry and set it as our lookup bucket */
AllocatedEntry = &Directory->HashBuckets[HashIndex];
Modified: trunk/reactos/ntoskrnl/ob/obinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obinit.c (original)
+++ trunk/reactos/ntoskrnl/ob/obinit.c Thu Oct 26 05:49:51 2006
@@ -61,7 +61,7 @@
NTAPI
ObInit2(VOID)
{
- ULONG i;
+ CCHAR i;
PKPRCB Prcb;
PNPAGED_LOOKASIDE_LIST CurrentList = NULL;
Modified: trunk/reactos/ntoskrnl/ob/oblife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/oblife.c (original)
+++ trunk/reactos/ntoskrnl/ob/oblife.c Thu Oct 26 05:49:51 2006
@@ -332,8 +332,8 @@
}
/* Setup the string */
- CapturedName->Length = StringLength;
- CapturedName->MaximumLength = MaximumLength;
+ CapturedName->Length = (USHORT)StringLength;
+ CapturedName->MaximumLength = (USHORT)MaximumLength;
CapturedName->Buffer = StringBuffer;
/* Make sure we have a buffer */
Modified: trunk/reactos/ntoskrnl/ob/symlink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/symlink.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/symlink.c (original)
+++ trunk/reactos/ntoskrnl/ob/symlink.c Thu Oct 26 05:49:51 2006
@@ -12,10 +12,6 @@
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
-
-#if defined (ALLOC_PRAGMA)
-#pragma alloc_text(INIT, ObInitSymbolicLinkImplementation)
-#endif
/* GLOBALS ******************************************************************/
@@ -165,8 +161,8 @@
if (NewTargetPath != FullPath->Buffer) ExFreePool(FullPath->Buffer);
/* Update the path values */
- FullPath->Length = LengthUsed;
- FullPath->MaximumLength = MaximumLength;
+ FullPath->Length = (USHORT)LengthUsed;
+ FullPath->MaximumLength = (USHORT)MaximumLength;
FullPath->Buffer = NewTargetPath;
/* Tell the parse routine to start reparsing */
@@ -247,7 +243,7 @@
{
/* Round it down */
CapturedLinkTarget.MaximumLength =
- ALIGN_DOWN(CapturedLinkTarget.MaximumLength, WCHAR);
+ (USHORT)ALIGN_DOWN(CapturedLinkTarget.MaximumLength, WCHAR);
}
/* Fail if the length is odd, or if the maximum is smaller or 0 */
Modified: trunk/reactos/ntoskrnl/ps/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/process.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/process.c (original)
+++ trunk/reactos/ntoskrnl/ps/process.c Thu Oct 26 05:49:51 2006
@@ -658,9 +658,9 @@
if (!NT_SUCCESS(Status)) goto Cleanup;
/* Compute Quantum and Priority */
- Process->Pcb.BasePriority = PspComputeQuantumAndPriority(Process,
- 0,
- &Quantum);
+ Process->Pcb.BasePriority = (SCHAR)PspComputeQuantumAndPriority(Process,
+ 0,
+ &Quantum);
Process->Pcb.QuantumReset = Quantum;
/* Check if we have a parent other then the initial system process */
@@ -912,7 +912,7 @@
NTAPI
PsGetProcessExitProcessCalled(PEPROCESS Process)
{
- return Process->ProcessExiting;
+ return (BOOLEAN)Process->ProcessExiting;
}
/*
@@ -1083,7 +1083,7 @@
PsSetProcessPriorityClass(PEPROCESS Process,
ULONG PriorityClass)
{
- Process->PriorityClass = PriorityClass;
+ Process->PriorityClass = (UCHAR)PriorityClass;
}
/*
Modified: trunk/reactos/ntoskrnl/ps/security.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/security.c (original)
+++ trunk/reactos/ntoskrnl/ps/security.c Thu Oct 26 05:49:51 2006
@@ -141,7 +141,7 @@
}
/* Check if the thread is impersonating */
- IsImpersonating = Thread->ActiveImpersonationInfo;
+ IsImpersonating = (BOOLEAN)Thread->ActiveImpersonationInfo;
if (IsImpersonating)
{
/* Set TEB data */
Modified: trunk/reactos/ntoskrnl/rtl/libsupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/libsupp.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/rtl/libsupp.c (original)
+++ trunk/reactos/ntoskrnl/rtl/libsupp.c Thu Oct 26 05:49:51 2006
@@ -382,8 +382,8 @@
Source,
Length);
- UniDest->MaximumLength = Length;
- UniDest->Length = Length - sizeof (WCHAR);
+ UniDest->MaximumLength = (USHORT)Length;
+ UniDest->Length = (USHORT)Length - sizeof (WCHAR);
return TRUE;
}
Modified: trunk/reactos/ntoskrnl/rtl/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/rtl/misc.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/rtl/misc.c (original)
+++ trunk/reactos/ntoskrnl/rtl/misc.c Thu Oct 26 05:49:51 2006
@@ -73,9 +73,9 @@
if (lpVersionInformation->dwOSVersionInfoSize == sizeof(OSVERSIONINFOEXW))
{
RTL_OSVERSIONINFOEXW *InfoEx = (RTL_OSVERSIONINFOEXW *)lpVersionInformation;
- InfoEx->wServicePackMajor = (NtOSCSDVersion >> 8) & 0xFF;
- InfoEx->wServicePackMinor = NtOSCSDVersion & 0xFF;
- InfoEx->wSuiteMask = SharedUserData->SuiteMask;
+ InfoEx->wServicePackMajor = (USHORT)(NtOSCSDVersion >> 8) & 0xFF;
+ InfoEx->wServicePackMinor = (USHORT)(NtOSCSDVersion & 0xFF);
+ InfoEx->wSuiteMask = (USHORT)SharedUserData->SuiteMask;
InfoEx->wProductType = SharedUserData->NtProductType;
}
Modified: trunk/reactos/ntoskrnl/se/sd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=24657…
==============================================================================
--- trunk/reactos/ntoskrnl/se/sd.c (original)
+++ trunk/reactos/ntoskrnl/se/sd.c Thu Oct 26 05:49:51 2006
@@ -810,7 +810,7 @@
/* Build the new security descrtiptor */
RtlCreateSecurityDescriptorRelative(RelSD,
SECURITY_DESCRIPTOR_REVISION);
- RelSD->Control = Control;
+ RelSD->Control = (USHORT)Control;
Current = (ULONG_PTR)(RelSD + 1);
Modified: trunk/reactos/ntoskrnl/se/semgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/se/semgr.c (original)
+++ trunk/reactos/ntoskrnl/se/semgr.c Thu Oct 26 05:49:51 2006
@@ -340,7 +340,7 @@
RtlCreateSecurityDescriptor(NewSd,
SECURITY_DESCRIPTOR_REVISION1);
/* We always build a self-relative descriptor */
- NewSd->Control = Control | SE_SELF_RELATIVE;
+ NewSd->Control = (USHORT)Control | SE_SELF_RELATIVE;
Current = (ULONG_PTR)NewSd + sizeof(SECURITY_DESCRIPTOR);
@@ -754,7 +754,7 @@
RtlCreateSecurityDescriptor(Descriptor,
SECURITY_DESCRIPTOR_REVISION);
- Descriptor->Control = Control | SE_SELF_RELATIVE;
+ Descriptor->Control = (USHORT)Control | SE_SELF_RELATIVE;
Current = (ULONG_PTR)Descriptor + sizeof(SECURITY_DESCRIPTOR);
Modified: trunk/reactos/ntoskrnl/se/token.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=24…
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c (original)
+++ trunk/reactos/ntoskrnl/se/token.c Thu Oct 26 05:49:51 2006
@@ -621,7 +621,7 @@
PsImpersonateClient(ServerThread,
ClientContext->ClientToken,
1,
- (ULONG)b,
+ b,
ClientContext->SecurityQos.ImpersonationLevel);
}