- Mark a variable that is assigned inside an SEH block as _SEH2_VOLATILE.
- Silence some MSVC warnings

svn path=/trunk/; revision=57985
This commit is contained in:
Timo Kreuzer 2012-12-23 22:53:41 +00:00
parent 5b41ac7487
commit c963ccf7c2
3 changed files with 11 additions and 7 deletions

View file

@ -27,7 +27,7 @@ KsLoadResource(
PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry; PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
PVOID Data; PVOID Data;
ULONG Size; ULONG Size;
PVOID Result = NULL; PVOID _SEH2_VOLATILE Result = NULL;
/* set up resource info */ /* set up resource info */
ResourceInfo.Type = ResourceType; ResourceInfo.Type = ResourceType;
@ -131,7 +131,7 @@ KsGetImageNameAndResourceId(
} }
/* allocate image name buffer */ /* allocate image name buffer */
ImageName->MaximumLength = sizeof(ImagePath) + ImageLength; ImageName->MaximumLength = (USHORT)(sizeof(ImagePath) + ImageLength);
ImageName->Buffer = AllocateItem(PagedPool, ImageName->MaximumLength); ImageName->Buffer = AllocateItem(PagedPool, ImageName->MaximumLength);
/* check for success */ /* check for success */
@ -145,7 +145,11 @@ KsGetImageNameAndResourceId(
RtlCopyMemory(ImageName->Buffer, ImagePath, sizeof(ImagePath)); RtlCopyMemory(ImageName->Buffer, ImagePath, sizeof(ImagePath));
/* retrieve image name */ /* retrieve image name */
Status = KspQueryRegValue(RegKey, L"Image", &ImageName->Buffer[sizeof(ImagePath) / sizeof(WCHAR)], &ImageLength, NULL); Status = KspQueryRegValue(RegKey,
L"Image",
&ImageName->Buffer[sizeof(ImagePath) / sizeof(WCHAR)],
&ImageLength,
NULL);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {

View file

@ -9,7 +9,7 @@
@ stdcall -i386 ?NonDelegatedQueryInterface@CBaseUnknown@@UAGJABU_GUID@@PAPAX@Z(ptr ptr ptr) INonDelegatedUnknown_fnQueryInterface @ stdcall -i386 ?NonDelegatedQueryInterface@CBaseUnknown@@UAGJABU_GUID@@PAPAX@Z(ptr ptr ptr) INonDelegatedUnknown_fnQueryInterface
@ stdcall ?NonDelegatedRelease@CBaseUnknown@@UAGKXZ(ptr) IIndirectedUnknown_fnRelease @ stdcall ?NonDelegatedRelease@CBaseUnknown@@UAGKXZ(ptr) IIndirectedUnknown_fnRelease
@ stdcall DllInitialize(ptr) @ stdcall -private DllInitialize(ptr)
@ stdcall KoCreateInstance(ptr ptr long ptr ptr) @ stdcall KoCreateInstance(ptr ptr long ptr ptr)
@ stdcall KoDeviceInitialize(ptr) @ stdcall KoDeviceInitialize(ptr)
@ stdcall KoDriverInitialize(ptr ptr ptr) @ stdcall KoDriverInitialize(ptr ptr ptr)

View file

@ -678,7 +678,7 @@ KspDoReparseForIrp(
Length += wcslen(DeviceEntry->Instance); Length += wcslen(DeviceEntry->Instance);
/* zero byte and '\\' */ /* zero byte and '\\' */
Length += 2; Length += 2;
/* allocate buffer */ /* allocate buffer */
Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR)); Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR));
@ -1532,7 +1532,7 @@ KsCreateBusEnumObject(
} }
BusDeviceExtension->ServicePath.Length = 0; BusDeviceExtension->ServicePath.Length = 0;
BusDeviceExtension->ServicePath.MaximumLength = Length; BusDeviceExtension->ServicePath.MaximumLength = (USHORT)Length;
BusDeviceExtension->ServicePath.Buffer = AllocateItem(NonPagedPool, Length); BusDeviceExtension->ServicePath.Buffer = AllocateItem(NonPagedPool, Length);
if (!BusDeviceExtension->ServicePath.Buffer) if (!BusDeviceExtension->ServicePath.Buffer)
@ -2120,7 +2120,7 @@ KsServiceBusEnumPnpRequest(
/* /*
@implemented @implemented
*/ */
KSDDKAPI KSDDKAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
KsRemoveBusEnumInterface( KsRemoveBusEnumInterface(