From b70845423e53b3bceda10fc4dd43de606d21df19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 4 Jan 2013 11:47:19 +0000 Subject: [PATCH] while (TRUE); (when something is unimplemented) ---> ASSERT(FALSE); // while (TRUE); (unless we deal with a 'noreturn' function), and in some cases, return an adequate value. Part 1/2 svn path=/trunk/; revision=58110 --- reactos/dll/win32/kernel32/client/path.c | 3 +- reactos/dll/win32/kernel32/client/thread.c | 15 ++-- reactos/drivers/bus/pcix/device.c | 6 +- reactos/drivers/bus/pcix/enum.c | 25 +++---- reactos/drivers/bus/pcix/fdo.c | 26 +++---- reactos/drivers/bus/pcix/init.c | 4 +- reactos/drivers/bus/pcix/intrface/agpintrf.c | 3 +- reactos/drivers/bus/pcix/intrface/busintrf.c | 3 +- reactos/drivers/bus/pcix/intrface/cardbus.c | 17 ++--- reactos/drivers/bus/pcix/intrface/devhere.c | 3 +- reactos/drivers/bus/pcix/intrface/lddintrf.c | 3 +- reactos/drivers/bus/pcix/intrface/locintrf.c | 3 +- reactos/drivers/bus/pcix/intrface/pmeintf.c | 3 +- reactos/drivers/bus/pcix/intrface/routintf.c | 3 +- reactos/drivers/bus/pcix/pci/config.c | 2 +- reactos/drivers/bus/pcix/pci/ppbridge.c | 2 +- reactos/drivers/bus/pcix/pcivrify.c | 2 +- reactos/drivers/bus/pcix/pdo.c | 26 +++---- reactos/drivers/bus/pcix/power.c | 3 +- reactos/drivers/bus/pcix/utils.c | 5 +- .../drivers/storage/class/ramdisk/ramdisk.c | 69 +++++++++---------- reactos/drivers/usb/usbhub/fdo.c | 2 +- reactos/hal/halx86/acpi/halpnpdd.c | 2 +- reactos/hal/halx86/generic/bios.c | 2 + reactos/hal/halx86/generic/misc.c | 2 +- reactos/hal/halx86/generic/spinlock.c | 6 +- reactos/hal/halx86/legacy/bus/cmosbus.c | 4 +- reactos/hal/halx86/legacy/bus/pcibus.c | 9 +-- reactos/hal/halx86/legacy/halpnpdd.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 2 +- 30 files changed, 139 insertions(+), 118 deletions(-) diff --git a/reactos/dll/win32/kernel32/client/path.c b/reactos/dll/win32/kernel32/client/path.c index 48224db7a3a..2229d3ed835 100644 --- a/reactos/dll/win32/kernel32/client/path.c +++ b/reactos/dll/win32/kernel32/client/path.c @@ -237,7 +237,8 @@ BasepComputeProcessPath(IN PBASE_SEARCH_PATH_TYPE PathOrder, { /* This means someone added RTL_PERTHREAD_CURDIR */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); + // while (TRUE); } /* We do not. Do we have the LDR_ENTRY for the executable? */ diff --git a/reactos/dll/win32/kernel32/client/thread.c b/reactos/dll/win32/kernel32/client/thread.c index 404bd11d20e..c9d7f173978 100644 --- a/reactos/dll/win32/kernel32/client/thread.c +++ b/reactos/dll/win32/kernel32/client/thread.c @@ -241,7 +241,8 @@ CreateRemoteThread(IN HANDLE hProcess, DbgPrint("SXS: %s - Failing thread create because " "NtQueryInformationThread() failed with status %08lx\n", __FUNCTION__, Status); - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return NULL; } /* Allocate the Activation Context Stack */ @@ -252,7 +253,8 @@ CreateRemoteThread(IN HANDLE hProcess, DbgPrint("SXS: %s - Failing thread create because " "RtlAllocateActivationContextStack() failed with status %08lx\n", __FUNCTION__, Status); - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return NULL; } /* Save it */ @@ -274,7 +276,8 @@ CreateRemoteThread(IN HANDLE hProcess, DbgPrint("SXS: %s - Failing thread create because " "RtlQueryInformationActivationContext() failed with status %08lx\n", __FUNCTION__, Status); - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return NULL; } /* Does it need to be activated? */ @@ -291,7 +294,8 @@ CreateRemoteThread(IN HANDLE hProcess, DbgPrint("SXS: %s - Failing thread create because " "RtlActivateActivationContextEx() failed with status %08lx\n", __FUNCTION__, Status); - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return NULL; } } } @@ -367,7 +371,8 @@ ExitThread(IN DWORD uExitCode) /* We should never reach this place */ DPRINT1("It should not happen\n"); - while (TRUE); + ASSERT(FALSE); + while (TRUE); // 'noreturn' function. } /* diff --git a/reactos/drivers/bus/pcix/device.c b/reactos/drivers/bus/pcix/device.c index 360f5ceec5a..c8a1accdfcf 100644 --- a/reactos/drivers/bus/pcix/device.c +++ b/reactos/drivers/bus/pcix/device.c @@ -262,7 +262,7 @@ Device_GetAdditionalResourceDescriptors(IN PPCI_CONFIGURATOR_CONTEXT Context, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -272,7 +272,7 @@ Device_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -282,7 +282,7 @@ Device_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* EOF */ diff --git a/reactos/drivers/bus/pcix/enum.c b/reactos/drivers/bus/pcix/enum.c index 537c78fb775..4fde88f0aa2 100644 --- a/reactos/drivers/bus/pcix/enum.c +++ b/reactos/drivers/bus/pcix/enum.c @@ -148,13 +148,13 @@ PciComputeNewCurrentSettings(IN PPCI_PDO_EXTENSION PdoExtension, /* Not used in the driver yet */ case 1: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; /* Not used in the driver yet */ case 2: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; /* A drain request */ @@ -541,7 +541,8 @@ PciQueryEjectionRelations(IN PPCI_PDO_EXTENSION PdoExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } NTSTATUS @@ -599,7 +600,7 @@ PciQueryRequirements(IN PPCI_PDO_EXTENSION PdoExtension, { /* Have not tested this on eVb's machine yet */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Check if the requirements are actually the zero list */ @@ -1522,7 +1523,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* Not really handling this year */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); /* Check for PCI bridges with the ISA bit set, or required */ if ((PdoExtension) && @@ -1532,7 +1533,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* We'll need to do some legacy support */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } } else @@ -1547,7 +1548,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* Again, some more legacy support we'll have to do */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } } } @@ -1557,7 +1558,7 @@ PciProcessBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* Not yet supported */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } } @@ -1606,7 +1607,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension) { DPRINT1("PCI: Bus numbers have been changed! Restoring originals.\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } } @@ -1668,7 +1669,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* Check if this PCI device is the ACPI Watchdog Device... */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Check for non-simple devices */ @@ -1734,7 +1735,7 @@ PciScanBus(IN PPCI_FDO_EXTENSION DeviceExtension) { /* Rescan scenarios are not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Bus processing will need to happen */ @@ -2197,7 +2198,7 @@ PciSetResources(IN PPCI_PDO_EXTENSION PdoExtension, { /* Don't have hotplug devices to test with yet, QEMU 0.14 should */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Locate the correct resource configurator for this type of device */ diff --git a/reactos/drivers/bus/pcix/fdo.c b/reactos/drivers/bus/pcix/fdo.c index 785dfca3c52..ed80518b793 100644 --- a/reactos/drivers/bus/pcix/fdo.c +++ b/reactos/drivers/bus/pcix/fdo.c @@ -94,7 +94,7 @@ PciFdoIrpStartDevice(IN PIRP Irp, /* These resources would only be for non-root FDOs, unhandled for now */ ASSERT(Resources->Count == 1); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Initialize the arbiter for this FDO */ @@ -112,7 +112,7 @@ PciFdoIrpStartDevice(IN PIRP Irp, /* Unhandled for now */ ASSERT(Resources->Count == 1); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Commit the transition to the started state */ @@ -137,7 +137,7 @@ PciFdoIrpRemoveDevice(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -148,7 +148,7 @@ PciFdoIrpCancelRemoveDevice(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -159,7 +159,7 @@ PciFdoIrpStopDevice(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -170,7 +170,7 @@ PciFdoIrpQueryStopDevice(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -181,7 +181,7 @@ PciFdoIrpCancelStopDevice(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -319,7 +319,7 @@ PciFdoIrpDeviceUsageNotification(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -330,7 +330,7 @@ PciFdoIrpSurpriseRemoval(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -341,7 +341,7 @@ PciFdoIrpQueryLegacyBusInformation(IN PIRP Irp, IN PPCI_FDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -393,7 +393,7 @@ PciGetHotPlugParameters(IN PPCI_FDO_EXTENSION FdoExtension) /* HotPlug PCI Support not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } while (FALSE); /* Free the buffer and return */ @@ -545,7 +545,7 @@ PciAddDevice(IN PDRIVER_OBJECT DriverObject, { /* Root PDO in ReactOS does not assign boot resources */ UNIMPLEMENTED; -// while (TRUE); + ASSERT(FALSE); // while (TRUE); DPRINT1("Encountered during setup\n"); Descriptor = NULL; } @@ -554,7 +554,7 @@ PciAddDevice(IN PDRIVER_OBJECT DriverObject, { /* Root PDO in ReactOS does not assign boot resources */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } else { diff --git a/reactos/drivers/bus/pcix/init.c b/reactos/drivers/bus/pcix/init.c index 45e02ae011f..36d1d930ee4 100644 --- a/reactos/drivers/bus/pcix/init.c +++ b/reactos/drivers/bus/pcix/init.c @@ -679,7 +679,7 @@ PciGetDebugPorts(IN HANDLE DebugKey) { /* This function is not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } @@ -690,7 +690,7 @@ PciDriverUnload(IN PDRIVER_OBJECT DriverObject) /* This function is not yet implemented */ DPRINT1("PCI: Unload\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } NTSTATUS diff --git a/reactos/drivers/bus/pcix/intrface/agpintrf.c b/reactos/drivers/bus/pcix/intrface/agpintrf.c index a860ad15bfa..e9d285dc921 100644 --- a/reactos/drivers/bus/pcix/intrface/agpintrf.c +++ b/reactos/drivers/bus/pcix/intrface/agpintrf.c @@ -59,7 +59,8 @@ agpintrf_Constructor(IN PVOID DeviceExtension, /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/busintrf.c b/reactos/drivers/bus/pcix/intrface/busintrf.c index 08681cb1be7..a6dc65d561f 100644 --- a/reactos/drivers/bus/pcix/intrface/busintrf.c +++ b/reactos/drivers/bus/pcix/intrface/busintrf.c @@ -49,7 +49,8 @@ busintrf_Constructor(IN PVOID DeviceExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/cardbus.c b/reactos/drivers/bus/pcix/intrface/cardbus.c index e51fb12f308..be6ce008cdf 100644 --- a/reactos/drivers/bus/pcix/intrface/cardbus.c +++ b/reactos/drivers/bus/pcix/intrface/cardbus.c @@ -34,7 +34,7 @@ NTAPI Cardbus_SaveCurrentSettings(IN PPCI_CONFIGURATOR_CONTEXT Context) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -42,7 +42,7 @@ NTAPI Cardbus_SaveLimits(IN PPCI_CONFIGURATOR_CONTEXT Context) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -50,7 +50,7 @@ NTAPI Cardbus_MassageHeaderForLimitsDetermination(IN PPCI_CONFIGURATOR_CONTEXT Context) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -58,7 +58,7 @@ NTAPI Cardbus_RestoreCurrent(IN PPCI_CONFIGURATOR_CONTEXT Context) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -68,7 +68,7 @@ Cardbus_GetAdditionalResourceDescriptors(IN PPCI_CONFIGURATOR_CONTEXT Context, IN PIO_RESOURCE_DESCRIPTOR IoDescriptor) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -77,7 +77,7 @@ Cardbus_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -86,7 +86,7 @@ Cardbus_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } NTSTATUS @@ -109,7 +109,8 @@ pcicbintrf_Constructor(IN PVOID DeviceExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/devhere.c b/reactos/drivers/bus/pcix/intrface/devhere.c index 919ff30dc56..b2d4548dd21 100644 --- a/reactos/drivers/bus/pcix/intrface/devhere.c +++ b/reactos/drivers/bus/pcix/intrface/devhere.c @@ -51,7 +51,8 @@ devpresent_Constructor(IN PVOID DeviceExtension, /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/lddintrf.c b/reactos/drivers/bus/pcix/intrface/lddintrf.c index 6665427f1fd..512390e66f1 100644 --- a/reactos/drivers/bus/pcix/intrface/lddintrf.c +++ b/reactos/drivers/bus/pcix/intrface/lddintrf.c @@ -49,7 +49,8 @@ lddintrf_Constructor(IN PVOID DeviceExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/locintrf.c b/reactos/drivers/bus/pcix/intrface/locintrf.c index f2ca1797ba7..814d69e808e 100644 --- a/reactos/drivers/bus/pcix/intrface/locintrf.c +++ b/reactos/drivers/bus/pcix/intrface/locintrf.c @@ -49,7 +49,8 @@ locintrf_Constructor(IN PVOID DeviceExtension, { /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/pmeintf.c b/reactos/drivers/bus/pcix/intrface/pmeintf.c index 5b59e9af68b..0debb22eba4 100644 --- a/reactos/drivers/bus/pcix/intrface/pmeintf.c +++ b/reactos/drivers/bus/pcix/intrface/pmeintf.c @@ -52,7 +52,8 @@ PciPmeInterfaceConstructor(IN PVOID DeviceExtension, /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } /* EOF */ diff --git a/reactos/drivers/bus/pcix/intrface/routintf.c b/reactos/drivers/bus/pcix/intrface/routintf.c index d7b7b458b4d..f7e53711be6 100644 --- a/reactos/drivers/bus/pcix/intrface/routintf.c +++ b/reactos/drivers/bus/pcix/intrface/routintf.c @@ -54,7 +54,8 @@ routeintrf_Constructor(IN PVOID DeviceExtension, /* Not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return STATUS_NOT_IMPLEMENTED; } NTSTATUS diff --git a/reactos/drivers/bus/pcix/pci/config.c b/reactos/drivers/bus/pcix/pci/config.c index 453656d2fde..c4fc3c71b6d 100644 --- a/reactos/drivers/bus/pcix/pci/config.c +++ b/reactos/drivers/bus/pcix/pci/config.c @@ -66,7 +66,7 @@ PciReadWriteConfigSpace(IN PPCI_FDO_EXTENSION DeviceExtension, { /* Currently this driver only supports the legacy HAL interface */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } else { diff --git a/reactos/drivers/bus/pcix/pci/ppbridge.c b/reactos/drivers/bus/pcix/pci/ppbridge.c index 57b660d2134..7881f1dc448 100644 --- a/reactos/drivers/bus/pcix/pci/ppbridge.c +++ b/reactos/drivers/bus/pcix/pci/ppbridge.c @@ -672,7 +672,7 @@ PPBridge_ResetDevice(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID diff --git a/reactos/drivers/bus/pcix/pcivrify.c b/reactos/drivers/bus/pcix/pcivrify.c index f51f02dba89..1d04ee73dd9 100644 --- a/reactos/drivers/bus/pcix/pcivrify.c +++ b/reactos/drivers/bus/pcix/pcivrify.c @@ -80,7 +80,7 @@ PciVerifierProfileChangeCallback(IN PVOID NotificationStructure, { /* This function is not yet implemented */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } diff --git a/reactos/drivers/bus/pcix/pdo.c b/reactos/drivers/bus/pcix/pdo.c index 4bbc524dec0..7a647d6eca8 100644 --- a/reactos/drivers/bus/pcix/pdo.c +++ b/reactos/drivers/bus/pcix/pdo.c @@ -80,7 +80,7 @@ PciPdoWaitWake(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -101,7 +101,7 @@ PciPdoIrpQueryPower(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -219,7 +219,7 @@ PciPdoIrpRemoveDevice(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -230,7 +230,7 @@ PciPdoIrpCancelRemoveDevice(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -241,7 +241,7 @@ PciPdoIrpStopDevice(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -252,7 +252,7 @@ PciPdoIrpQueryStopDevice(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -263,7 +263,7 @@ PciPdoIrpCancelStopDevice(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -274,7 +274,7 @@ PciPdoIrpQueryInterface(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -405,7 +405,7 @@ PciPdoIrpReadConfig(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -416,7 +416,7 @@ PciPdoIrpWriteConfig(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -437,7 +437,7 @@ PciPdoIrpDeviceUsageNotification(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -448,7 +448,7 @@ PciPdoIrpSurpriseRemoval(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } @@ -459,7 +459,7 @@ PciPdoIrpQueryLegacyBusInformation(IN PIRP Irp, IN PPCI_PDO_EXTENSION DeviceExtension) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_NOT_SUPPORTED; } diff --git a/reactos/drivers/bus/pcix/power.c b/reactos/drivers/bus/pcix/power.c index d57c1b78398..d52aab00ae6 100644 --- a/reactos/drivers/bus/pcix/power.c +++ b/reactos/drivers/bus/pcix/power.c @@ -192,7 +192,8 @@ PciSetPowerManagedDevicePowerState(IN PPCI_PDO_EXTENSION DeviceExtension, { /* We would normally re-assign resources after powerup */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + Status = STATUS_NOT_IMPLEMENTED; } } diff --git a/reactos/drivers/bus/pcix/utils.c b/reactos/drivers/bus/pcix/utils.c index 5948e8a5168..d7511f769cd 100644 --- a/reactos/drivers/bus/pcix/utils.c +++ b/reactos/drivers/bus/pcix/utils.c @@ -153,7 +153,7 @@ PciIsDatacenter(VOID) { /* This scenario shouldn't happen yet, since SetupDD isn't used */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } /* Return if this is Datacenter or not */ @@ -758,7 +758,8 @@ PciIsDeviceOnDebugPath(IN PPCI_PDO_EXTENSION DeviceExtension) /* eVb has not been able to test such devices yet */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); + return FALSE; } NTSTATUS diff --git a/reactos/drivers/storage/class/ramdisk/ramdisk.c b/reactos/drivers/storage/class/ramdisk/ramdisk.c index 42b94c9b0a0..06f6461b2a8 100644 --- a/reactos/drivers/storage/class/ramdisk/ramdisk.c +++ b/reactos/drivers/storage/class/ramdisk/ramdisk.c @@ -773,7 +773,7 @@ RamdiskCreateDiskDevice(IN PRAMDISK_BUS_EXTENSION DeviceExtension, FailCreate: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } @@ -1068,7 +1068,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("Get drive layout request\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_DISK_GET_PARTITION_INFO: @@ -1080,7 +1080,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("Invalid request\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; } @@ -1097,7 +1097,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("Read/Write request\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; // @@ -1107,7 +1107,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("SCSI request\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; // @@ -1117,7 +1117,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("Flush request\n"); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; // @@ -1127,7 +1127,7 @@ RamdiskWorkerThread(IN PDEVICE_OBJECT DeviceObject, DPRINT1("Invalid request: %lx\n", IoStackLocation->MajorFunction); UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; } @@ -1481,8 +1481,7 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject, // // We don't handle anything else yet // - ASSERT(FALSE); - while (TRUE); + ASSERT(FALSE); // while (TRUE); } } else @@ -1498,7 +1497,7 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject, case IOCTL_CDROM_CHECK_VERIFY: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_STORAGE_GET_MEDIA_TYPES: @@ -1664,67 +1663,67 @@ RamdiskDeviceControl(IN PDEVICE_OBJECT DeviceObject, case IOCTL_DISK_GET_DRIVE_LAYOUT: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_DISK_GET_LENGTH_INFO: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_DISK_IS_WRITABLE: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_SCSI_MINIPORT: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_STORAGE_QUERY_PROPERTY: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_MOUNTDEV_QUERY_UNIQUE_ID: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_MOUNTDEV_QUERY_STABLE_GUID: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_VOLUME_SET_GPT_ATTRIBUTES: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_VOLUME_GET_GPT_ATTRIBUTES: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IOCTL_VOLUME_OFFLINE: UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; default: @@ -1793,7 +1792,7 @@ RamdiskQueryDeviceRelations(IN DEVICE_RELATION_TYPE Type, // FIXME: TODO // UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } // @@ -1980,7 +1979,7 @@ RamdiskDeleteDiskDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } @@ -2148,37 +2147,37 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, case IRP_MN_START_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_QUERY_STOP_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_CANCEL_STOP_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_STOP_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_QUERY_REMOVE_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_CANCEL_REMOVE_DEVICE: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_REMOVE_DEVICE: @@ -2213,7 +2212,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, case IRP_MN_SURPRISE_REMOVAL: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_QUERY_ID: @@ -2224,7 +2223,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, if (DeviceExtension->Type == RamdiskDrive) { DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); } break; @@ -2236,14 +2235,14 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, if (DeviceExtension->Type == RamdiskDrive) { DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); } break; case IRP_MN_EJECT: DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); break; case IRP_MN_QUERY_DEVICE_TEXT: @@ -2254,7 +2253,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, if (DeviceExtension->Type == RamdiskDrive) { DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); } break; @@ -2278,7 +2277,7 @@ RamdiskPnp(IN PDEVICE_OBJECT DeviceObject, if (DeviceExtension->Type == RamdiskDrive) { DPRINT1("PnP IRP: %lx\n", Minor); - while (TRUE); + ASSERT(FALSE); // while (TRUE); } break; diff --git a/reactos/drivers/usb/usbhub/fdo.c b/reactos/drivers/usb/usbhub/fdo.c index 0342b13bc17..d6c62988acf 100644 --- a/reactos/drivers/usb/usbhub/fdo.c +++ b/reactos/drivers/usb/usbhub/fdo.c @@ -1,4 +1,4 @@ -/* +/* * PROJECT: ReactOS Universal Serial Bus Hub Driver * LICENSE: GPL - See COPYING in the top level directory * FILE: drivers/usb/usbhub/fdo.c diff --git a/reactos/hal/halx86/acpi/halpnpdd.c b/reactos/hal/halx86/acpi/halpnpdd.c index a0bf7439ad5..37e13eea43c 100644 --- a/reactos/hal/halx86/acpi/halpnpdd.c +++ b/reactos/hal/halx86/acpi/halpnpdd.c @@ -814,7 +814,7 @@ HalpDispatchWmi(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { DPRINT1("HAL: PnP Driver WMI!\n"); - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } diff --git a/reactos/hal/halx86/generic/bios.c b/reactos/hal/halx86/generic/bios.c index 2fb9ef98f01..fa159e09239 100644 --- a/reactos/hal/halx86/generic/bios.c +++ b/reactos/hal/halx86/generic/bios.c @@ -216,6 +216,8 @@ HalpTrap0DHandler(IN PKTRAP_FRAME TrapFrame) /* Strange, it isn't! This can happen during NMI */ DPRINT1("HAL: Trap0D while not in V86 mode\n"); KiDumpTrapFrame(TrapFrame); + + ASSERT(FALSE); while (TRUE); } diff --git a/reactos/hal/halx86/generic/misc.c b/reactos/hal/halx86/generic/misc.c index 1c3790187e2..87be9c8a5bd 100644 --- a/reactos/hal/halx86/generic/misc.c +++ b/reactos/hal/halx86/generic/misc.c @@ -229,7 +229,7 @@ HalHandleNMI(IN PVOID NmiInfo) // // Don't recurse // - if (HalpNMIInProgress++) while (TRUE); + if (HalpNMIInProgress++) ASSERT(FALSE); // while (TRUE); // // Read the system control register B diff --git a/reactos/hal/halx86/generic/spinlock.c b/reactos/hal/halx86/generic/spinlock.c index 77aaa217113..d9cf19b4e29 100644 --- a/reactos/hal/halx86/generic/spinlock.c +++ b/reactos/hal/halx86/generic/spinlock.c @@ -182,7 +182,8 @@ KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, { #ifdef CONFIG_SMP ASSERT(FALSE); // FIXME: Unused - while (TRUE); + // while (TRUE); + return FALSE; #endif /* Simply raise to synch */ @@ -206,7 +207,8 @@ KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, { #ifdef CONFIG_SMP ASSERT(FALSE); // FIXME: Unused - while (TRUE); + // while (TRUE); + return FALSE; #endif /* Simply raise to dispatch */ diff --git a/reactos/hal/halx86/legacy/bus/cmosbus.c b/reactos/hal/halx86/legacy/bus/cmosbus.c index 279aebf9e20..5561284040f 100644 --- a/reactos/hal/halx86/legacy/bus/cmosbus.c +++ b/reactos/hal/halx86/legacy/bus/cmosbus.c @@ -26,7 +26,7 @@ HalpcGetCmosData(IN PBUS_HANDLER BusHandler, IN ULONG Length) { DPRINT1("CMOS GetData\n"); - while (TRUE); + ASSERT(FALSE); // while (TRUE); return 0; } @@ -40,7 +40,7 @@ HalpcSetCmosData(IN PBUS_HANDLER BusHandler, IN ULONG Length) { DPRINT1("CMOS SetData\n"); - while (TRUE); + ASSERT(FALSE); // while (TRUE); return 0; } diff --git a/reactos/hal/halx86/legacy/bus/pcibus.c b/reactos/hal/halx86/legacy/bus/pcibus.c index 071027920f9..b1bde8a7178 100644 --- a/reactos/hal/halx86/legacy/bus/pcibus.c +++ b/reactos/hal/halx86/legacy/bus/pcibus.c @@ -537,7 +537,7 @@ HalpPCIPin2ISALine(IN PBUS_HANDLER BusHandler, IN PPCI_COMMON_CONFIG PciData) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } VOID @@ -549,7 +549,7 @@ HalpPCIISALine2Pin(IN PBUS_HANDLER BusHandler, IN PPCI_COMMON_CONFIG PciOldData) { UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } NTSTATUS @@ -643,7 +643,8 @@ HalpRegisterPciDebuggingDeviceInfo(VOID) /* FIXME: TODO */ DPRINT1("You have implemented the KD routines for searching PCI debugger" "devices, but you have forgotten to implement this routine\n"); - while (TRUE); + UNIMPLEMENTED; + ASSERT(FALSE); // while (TRUE); } static ULONG NTAPI @@ -678,7 +679,7 @@ HalpAdjustPCIResourceList(IN PBUS_HANDLER BusHandler, { /* /PCILOCK is not yet supported */ UNIMPLEMENTED; - while (TRUE); + ASSERT(FALSE); // while (TRUE); } #endif /* Now create the correct resource list based on the supported bus ranges */ diff --git a/reactos/hal/halx86/legacy/halpnpdd.c b/reactos/hal/halx86/legacy/halpnpdd.c index 62534a925b5..c79a9a387f6 100644 --- a/reactos/hal/halx86/legacy/halpnpdd.c +++ b/reactos/hal/halx86/legacy/halpnpdd.c @@ -812,7 +812,7 @@ HalpDispatchWmi(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { DPRINT1("HAL: PnP Driver WMI!\n"); - while (TRUE); + ASSERT(FALSE); // while (TRUE); return STATUS_SUCCESS; } diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index ebba94d5377..cd998bb70c6 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -3784,7 +3784,7 @@ PiGetDeviceRegistryProperty(IN PDEVICE_OBJECT DeviceObject, #define PIP_RETURN_DATA(x, y) {ReturnLength = x; Data = y; Status = STATUS_SUCCESS; break;} #define PIP_REGISTRY_DATA(x, y) {ValueName = x; ValueType = y; break;} -#define PIP_UNIMPLEMENTED() {UNIMPLEMENTED; while(TRUE); break;} +#define PIP_UNIMPLEMENTED() {UNIMPLEMENTED; ASSERT(FALSE); break;} // while(TRUE); /* * @implemented