mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[XDK] Remove UNREFERENCE_LOCAL_VARIABLE macro
Change UNREFERENCED_PARAMETER to (VOID)P to support const parameters
This commit is contained in:
parent
af0f8581ad
commit
46ca069e42
7 changed files with 10 additions and 20 deletions
|
@ -1606,12 +1606,11 @@ FatalAppExitW(IN UINT uAction,
|
|||
#endif
|
||||
&Response);
|
||||
|
||||
#if DBG
|
||||
/* Give the user a chance to abort */
|
||||
if ((NT_SUCCESS(Status)) && (Response == ResponseCancel)) return;
|
||||
#else
|
||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
||||
#endif
|
||||
if ((NT_SUCCESS(Status)) && (Response == ResponseCancel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Otherwise kill the process */
|
||||
ExitProcess(0);
|
||||
|
|
|
@ -166,7 +166,7 @@ BOOLEAN TryNoRaise(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) {
|
|||
#define CheckSpinLockLock(SpinLock, CheckData, Value) do \
|
||||
{ \
|
||||
PKTHREAD Thread = KeGetCurrentThread(); \
|
||||
UNREFERENCED_LOCAL_VARIABLE(Thread); \
|
||||
(VOID)Thread; \
|
||||
if (KmtIsMultiProcessorBuild) \
|
||||
{ \
|
||||
ok_eq_bool(Ret, (Value) == 0); \
|
||||
|
|
|
@ -314,8 +314,7 @@
|
|||
#endif /* DEPRECATE_DDK_FUNCTIONS */
|
||||
|
||||
/* Use to silence unused variable warnings when it is intentional */
|
||||
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||
#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
|
||||
#define UNREFERENCED_PARAMETER(P) ((void)(P))
|
||||
#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
|
||||
|
||||
|
|
|
@ -4262,7 +4262,7 @@ VOID
|
|||
MemoryBarrier(VOID)
|
||||
{
|
||||
LONG Barrier, *Dummy = &Barrier;
|
||||
UNREFERENCED_LOCAL_VARIABLE(Dummy);
|
||||
(VOID)Dummy;
|
||||
__asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory");
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -52,7 +52,7 @@ VOID
|
|||
KeMemoryBarrier(VOID)
|
||||
{
|
||||
LONG Barrier, *Dummy = &Barrier;
|
||||
UNREFERENCED_LOCAL_VARIABLE(Dummy);
|
||||
(VOID)Dummy;
|
||||
|
||||
#if defined(__GNUC__)
|
||||
__asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax");
|
||||
|
|
|
@ -1477,14 +1477,10 @@ VideoPortAcquireDeviceLock(
|
|||
IN PVOID HwDeviceExtension)
|
||||
{
|
||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||
NTSTATUS Status;
|
||||
|
||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
||||
|
||||
TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
|
||||
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
||||
Status = KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive,
|
||||
KernelMode, FALSE, NULL);
|
||||
KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive, KernelMode, FALSE, NULL);
|
||||
// ASSERT(Status == STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
@ -1497,13 +1493,10 @@ VideoPortReleaseDeviceLock(
|
|||
IN PVOID HwDeviceExtension)
|
||||
{
|
||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||
LONG Status;
|
||||
|
||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
||||
|
||||
TRACE_(VIDEOPRT, "VideoPortReleaseDeviceLock\n");
|
||||
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
||||
Status = KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
|
||||
KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
|
||||
//ASSERT(Status == STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ UserDerefObjectCo(PVOID obj)
|
|||
PTHREADINFO W32Thread;
|
||||
PSINGLE_LIST_ENTRY ReferenceEntry;
|
||||
PUSER_REFERENCE_ENTRY UserReferenceEntry;
|
||||
UNREFERENCED_LOCAL_VARIABLE(UserReferenceEntry);
|
||||
|
||||
ASSERT(obj != NULL);
|
||||
W32Thread = PsGetCurrentThreadWin32Thread();
|
||||
|
|
Loading…
Reference in a new issue