[KS]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 23 Dec 2012 22:53:41 +0000 (22:53 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 23 Dec 2012 22:53:41 +0000 (22:53 +0000)
- Mark a variable that is assigned inside an SEH block as _SEH2_VOLATILE.
- Silence some MSVC warnings

svn path=/trunk/; revision=57985

reactos/drivers/ksfilter/ks/image.c
reactos/drivers/ksfilter/ks/ks.spec
reactos/drivers/ksfilter/ks/swenum.c

index decabbe..55828b8 100644 (file)
@@ -27,7 +27,7 @@ KsLoadResource(
     PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
     PVOID Data;
     ULONG Size;
-    PVOID Result = NULL;
+    PVOID _SEH2_VOLATILE Result = NULL;
 
     /* set up resource info */
     ResourceInfo.Type = ResourceType;
@@ -131,7 +131,7 @@ KsGetImageNameAndResourceId(
     }
 
     /* allocate image name buffer */
-    ImageName->MaximumLength = sizeof(ImagePath) + ImageLength;
+    ImageName->MaximumLength = (USHORT)(sizeof(ImagePath) + ImageLength);
     ImageName->Buffer = AllocateItem(PagedPool, ImageName->MaximumLength);
 
     /* check for success */
@@ -145,7 +145,11 @@ KsGetImageNameAndResourceId(
     RtlCopyMemory(ImageName->Buffer, ImagePath, sizeof(ImagePath));
 
     /* 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))
     {
index 121ab1e..5ae9845 100644 (file)
@@ -9,7 +9,7 @@
 @ stdcall -i386 ?NonDelegatedQueryInterface@CBaseUnknown@@UAGJABU_GUID@@PAPAX@Z(ptr ptr ptr) INonDelegatedUnknown_fnQueryInterface
 @ stdcall ?NonDelegatedRelease@CBaseUnknown@@UAGKXZ(ptr) IIndirectedUnknown_fnRelease
 
-@ stdcall DllInitialize(ptr)
+@ stdcall -private DllInitialize(ptr)
 @ stdcall KoCreateInstance(ptr ptr long ptr ptr)
 @ stdcall KoDeviceInitialize(ptr)
 @ stdcall KoDriverInitialize(ptr ptr ptr)
index 8430b64..f389f2d 100644 (file)
@@ -678,7 +678,7 @@ KspDoReparseForIrp(
     Length += wcslen(DeviceEntry->Instance);
 
     /* zero byte and '\\' */
-    Length += 2; 
+    Length += 2;
 
     /* allocate buffer */
     Buffer = AllocateItem(NonPagedPool, Length * sizeof(WCHAR));
@@ -1532,7 +1532,7 @@ KsCreateBusEnumObject(
     }
 
     BusDeviceExtension->ServicePath.Length = 0;
-    BusDeviceExtension->ServicePath.MaximumLength = Length;
+    BusDeviceExtension->ServicePath.MaximumLength = (USHORT)Length;
     BusDeviceExtension->ServicePath.Buffer = AllocateItem(NonPagedPool, Length);
 
     if (!BusDeviceExtension->ServicePath.Buffer)
@@ -2120,7 +2120,7 @@ KsServiceBusEnumPnpRequest(
 /*
     @implemented
 */
-KSDDKAPI 
+KSDDKAPI
 NTSTATUS
 NTAPI
 KsRemoveBusEnumInterface(