Author: hpoussin
Date: Tue Oct 3 18:28:21 2006
New Revision: 24373
URL:
http://svn.reactos.org/svn/reactos?rev=24373&view=rev
Log:
Fix a few warnings
Modified:
trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/ump…
==============================================================================
--- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original)
+++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Tue Oct 3 18:28:21 2006
@@ -88,6 +88,8 @@
{
RPC_STATUS Status;
+ UNREFERENCED_PARAMETER(lpParameter);
+
DPRINT("RpcServerThread() called\n");
Status = RpcServerUseProtseqEpW(L"ncacn_np",
@@ -157,6 +159,8 @@
PNP_GetVersion(handle_t BindingHandle,
unsigned short *Version)
{
+ UNREFERENCED_PARAMETER(BindingHandle);
+
*Version = 0x0400;
return CR_SUCCESS;
}
@@ -168,6 +172,9 @@
unsigned long *State,
unsigned long Flags)
{
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
+
*State = CM_GLOBAL_STATE_CAN_DO_UI | CM_GLOBAL_STATE_SERVICES_AVAILABLE;
return CR_SUCCESS;
}
@@ -177,6 +184,8 @@
CONFIGRET
PNP_InitDetection(handle_t BindingHandle)
{
+ UNREFERENCED_PARAMETER(BindingHandle);
+
DPRINT("PNP_InitDetection() called\n");
return CR_SUCCESS;
}
@@ -189,6 +198,8 @@
unsigned long ProcessId)
{
HANDLE hProcess;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
DPRINT1("PNP_ReportLogOn(%lu, %lu) called\n", Admin, ProcessId);
@@ -225,22 +236,12 @@
unsigned long Flags)
{
CONFIGRET ret = CR_SUCCESS;
- HKEY hEnumKey = NULL;
HKEY hDeviceKey = NULL;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
DPRINT("PNP_ValidateDeviceInstance(%S %lx) called\n",
DeviceInstance, Flags);
-
- if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
- L"System\\CurrentControlSet\\Enum",
- 0,
- KEY_ALL_ACCESS,
- &hEnumKey))
- {
- DPRINT("Could not open the Enum Key!\n");
- ret = CR_FAILURE;
- goto Done;
- }
if (RegOpenKeyExW(hEnumKey,
DeviceInstance,
@@ -259,9 +260,6 @@
if (hDeviceKey != NULL)
RegCloseKey(hDeviceKey);
- if (hEnumKey != NULL)
- RegCloseKey(hEnumKey);
-
DPRINT("PNP_ValidateDeviceInstance() done (returns %lx)\n", ret);
return ret;
@@ -275,6 +273,8 @@
unsigned long Length)
{
CONFIGRET ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
DPRINT("PNP_GetRootDeviceInstance() called\n");
@@ -306,6 +306,9 @@
PLUGPLAY_CONTROL_RELATED_DEVICE_DATA PlugPlayData;
CONFIGRET ret = CR_SUCCESS;
NTSTATUS Status;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
DPRINT("PNP_GetRelatedDeviceInstance() called\n");
DPRINT(" Relationship %ld\n", Relationship);
@@ -350,6 +353,9 @@
CONFIGRET ret = CR_SUCCESS;
HKEY hKey;
DWORD dwError;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
DPRINT("PNP_EnumerateSubKeys() called\n");
@@ -398,6 +404,10 @@
unsigned long *Length,
DWORD Flags)
{
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Filter);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_GetDeviceListSize() called\n");
/* FIXME */
@@ -417,6 +427,9 @@
PLUGPLAY_CONTROL_DEPTH_DATA PlugPlayData;
CONFIGRET ret = CR_SUCCESS;
NTSTATUS Status;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
DPRINT("PNP_GetDepth() called\n");
@@ -457,6 +470,9 @@
LPWSTR lpValueName = NULL;
HKEY hKey = 0;
NTSTATUS Status;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
DPRINT("PNP_GetDeviceRegProp() called\n");
@@ -643,6 +659,9 @@
LPWSTR lpValueName = NULL;
HKEY hKey = 0;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_SetDeviceRegProp() called\n");
DPRINT("DeviceId: %S\n", DeviceId);
@@ -751,6 +770,11 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceId);
+ UNREFERENCED_PARAMETER(Buffer);
+ UNREFERENCED_PARAMETER(Length);
+
DPRINT("PNP_Get_Class_Instance() called\n");
DPRINT("PNP_Get_Class_Instance() done (returns %lx)\n", ret);
@@ -767,6 +791,11 @@
unsigned long Flags)
{
CONFIGRET ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(SubKey);
+ UNREFERENCED_PARAMETER(samDesired);
+ UNREFERENCED_PARAMETER(Flags);
DPRINT("PNP_CreateKey() called\n");
@@ -786,6 +815,12 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceId);
+ UNREFERENCED_PARAMETER(ParentKey);
+ UNREFERENCED_PARAMETER(ChildKey);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_DeleteRegistryKey() called\n");
DPRINT("PNP_DeleteRegistryKey() done (returns %lx)\n", ret);
@@ -803,6 +838,8 @@
{
HANDLE hKey = NULL;
DWORD dwError;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
pszRegPathClass,
@@ -846,6 +883,9 @@
HKEY hKey = NULL;
ULONG ulSize;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_GetClassName() called\n");
lstrcpyW(szKeyName, L"System\\CurrentControlSet\\Control\\Class");
@@ -893,6 +933,8 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+
DPRINT("PNP_GetClassName(%S, %lx) called\n", ClassGuid, Flags);
if (Flags & CM_DELETE_CLASS_SUBKEYS)
@@ -922,6 +964,12 @@
{
CONFIGRET ret = CR_CALL_NOT_IMPLEMENTED;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceId);
+ UNREFERENCED_PARAMETER(ParentDeviceId);
+ UNREFERENCED_PARAMETER(Length);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT1("PNP_CreateDevInst() called\n");
DPRINT1("PNP_CreateDevInst() done (returns %lx)\n", ret);
@@ -940,6 +988,11 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(MinorAction);
+ UNREFERENCED_PARAMETER(DeviceInstance1);
+ UNREFERENCED_PARAMETER(DeviceInstance2);
+
DPRINT("PNP_DeviceInstanceAction() called\n");
switch (MajorAction)
@@ -997,6 +1050,9 @@
CONFIGRET ret = CR_SUCCESS;
NTSTATUS Status;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_GetDeviceStatus() called\n");
RtlInitUnicodeString(&PlugPlayData.DeviceInstance,
@@ -1031,6 +1087,11 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(Problem);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT1("PNP_SetDeviceProblem() called\n");
/* FIXME */
@@ -1049,6 +1110,10 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT1("PNP_UninstallDevInst() called\n");
/* FIXME */
@@ -1070,7 +1135,7 @@
while (*lpPtr != 0)
{
dwLength = wcslen(lpPtr);
- if (!_wcsicmp(lpPtr, lpDeviceId))
+ if (0 == _wcsicmp(lpPtr, lpDeviceId))
return TRUE;
lpPtr += (dwLength + 1);
@@ -1113,6 +1178,8 @@
LPWSTR pszSubKey;
DWORD dwDeviceIdListSize;
WCHAR szDeviceIdList[512];
+
+ UNREFERENCED_PARAMETER(BindingHandle);
DPRINT("PNP_AddID() called\n");
DPRINT(" DeviceInstance: %S\n", DeviceInstance);
@@ -1185,6 +1252,8 @@
DWORD dwValue;
DWORD dwSize;
CONFIGRET ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
DPRINT1("PNP_IsDockStationPresent() called\n");
@@ -1232,6 +1301,8 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+
DPRINT1("PNP_RequestEjectPC() called\n");
ret = CR_FAILURE; /* FIXME */
@@ -1253,6 +1324,13 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Action);
+ UNREFERENCED_PARAMETER(DeviceId);
+ UNREFERENCED_PARAMETER(ProfileId);
+ UNREFERENCED_PARAMETER(Value);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT1("PNP_HwProfFlags() called\n");
ret = CR_CALL_NOT_IMPLEMENTED; /* FIXME */
@@ -1273,6 +1351,11 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(ulPriority);
+ UNREFERENCED_PARAMETER(ulFlags);
+
DPRINT1("PNP_AddEmptyLogConf() called\n");
*pulLogConfTag = 0; /* FIXME */
@@ -1293,6 +1376,12 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(ulType);
+ UNREFERENCED_PARAMETER(ulLogConfTag);
+ UNREFERENCED_PARAMETER(ulFlags);
+
DPRINT1("PNP_FreeLogConf() called\n");
@@ -1311,6 +1400,11 @@
ULONG ulFlags)
{
CONFIGRET ret = CR_SUCCESS;
+
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(ulPriority);
+ UNREFERENCED_PARAMETER(ulFlags);
DPRINT1("PNP_GetFirstLogConf() called\n");
@@ -1333,6 +1427,12 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(ulLogConfType);
+ UNREFERENCED_PARAMETER(ulCurrentTag);
+ UNREFERENCED_PARAMETER(ulFlags);
+
DPRINT1("PNP_GetNextLogConf() called\n");
*pulNextTag = 0; /* FIXME */
@@ -1354,6 +1454,12 @@
{
CONFIGRET ret = CR_SUCCESS;
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(DeviceInstance);
+ UNREFERENCED_PARAMETER(ulLogConfType);
+ UNREFERENCED_PARAMETER(ulCurrentTag);
+ UNREFERENCED_PARAMETER(ulFlags);
+
DPRINT1("PNP_GetLogConfPriority() called\n");
*pPriority = 0; /* FIXME */
@@ -1369,6 +1475,9 @@
PNP_RunDetection(handle_t BindingHandle,
unsigned long Flags)
{
+ UNREFERENCED_PARAMETER(BindingHandle);
+ UNREFERENCED_PARAMETER(Flags);
+
DPRINT("PNP_RunDetection() called\n");
return CR_CALL_NOT_IMPLEMENTED;
}
@@ -1396,12 +1505,12 @@
if (!NT_SUCCESS(Status))
return FALSE;
- if (PlugPlayData.DeviceStatus & DNF_STARTED || PlugPlayData.DeviceStatus &
DNF_START_FAILED)
+ if ((PlugPlayData.DeviceStatus & (DNF_STARTED | DNF_START_FAILED)) != 0)
/* Device is already started, or disabled due to some problem. Don't install
it */
return TRUE;
/* Install device */
- SetEnvironmentVariable(L"USERPROFILE", L"."); /* FIXME: why is it
needed? */
+ SetEnvironmentVariableW(L"USERPROFILE", L"."); /* FIXME: why is
it needed? */
hNewDev = LoadLibraryW(L"newdev.dll");
if (!hNewDev)
@@ -1467,6 +1576,8 @@
DeviceInstallParams* Params;
BOOL setupActive;
+ UNREFERENCED_PARAMETER(lpParameter);
+
setupActive = SetupIsActive();
SetEnvironmentVariable(L"USERPROFILE", L"."); /* FIXME: why is it
needed? */
@@ -1476,7 +1587,7 @@
#ifdef HAVE_SLIST_ENTRY_IMPLEMENTED
ListEntry = InterlockedPopEntrySList(&DeviceInstallListHead);
#else
- if (IsListEmpty(&DeviceInstallListHead))
+ if ((BOOL)IsListEmpty(&DeviceInstallListHead))
ListEntry = NULL;
else
ListEntry = RemoveHeadList(&DeviceInstallListHead);
@@ -1484,13 +1595,11 @@
if (ListEntry == NULL)
{
SetEvent(hNoPendingInstalls);
- DPRINT1("*** EVENT SETTED\n");
WaitForSingleObject(hDeviceInstallListNotEmpty, INFINITE);
}
else
{
ResetEvent(hNoPendingInstalls);
- DPRINT1("*** EVENT RESETTED\n");
Params = CONTAINING_RECORD(ListEntry, DeviceInstallParams, ListEntry);
InstallDevice(Params->DeviceIds, setupActive);
}
@@ -1507,6 +1616,8 @@
ULONG PnpEventSize;
NTSTATUS Status;
RPC_STATUS RpcStatus;
+
+ UNREFERENCED_PARAMETER(lpParameter);
PnpEventSize = 0x1000;
PnpEvent = HeapAlloc(GetProcessHeap(), 0, PnpEventSize);
@@ -1581,6 +1692,9 @@
HANDLE hThread;
DWORD dwThreadId;
+ UNREFERENCED_PARAMETER(argc);
+ UNREFERENCED_PARAMETER(argv);
+
DPRINT("ServiceMain() called\n");
hNoPendingInstalls = CreateEventW(NULL,
@@ -1624,6 +1738,9 @@
{
DWORD dwError;
+ UNREFERENCED_PARAMETER(argc);
+ UNREFERENCED_PARAMETER(argv);
+
DPRINT("Umpnpmgr: main() started\n");
hInstallEvent = CreateEvent(NULL, TRUE, FALSE, NULL);