mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +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
|
#endif
|
||||||
&Response);
|
&Response);
|
||||||
|
|
||||||
#if DBG
|
|
||||||
/* Give the user a chance to abort */
|
/* Give the user a chance to abort */
|
||||||
if ((NT_SUCCESS(Status)) && (Response == ResponseCancel)) return;
|
if ((NT_SUCCESS(Status)) && (Response == ResponseCancel))
|
||||||
#else
|
{
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
return;
|
||||||
#endif
|
}
|
||||||
|
|
||||||
/* Otherwise kill the process */
|
/* Otherwise kill the process */
|
||||||
ExitProcess(0);
|
ExitProcess(0);
|
||||||
|
|
|
@ -166,7 +166,7 @@ BOOLEAN TryNoRaise(PKSPIN_LOCK SpinLock, PCHECK_DATA CheckData) {
|
||||||
#define CheckSpinLockLock(SpinLock, CheckData, Value) do \
|
#define CheckSpinLockLock(SpinLock, CheckData, Value) do \
|
||||||
{ \
|
{ \
|
||||||
PKTHREAD Thread = KeGetCurrentThread(); \
|
PKTHREAD Thread = KeGetCurrentThread(); \
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Thread); \
|
(VOID)Thread; \
|
||||||
if (KmtIsMultiProcessorBuild) \
|
if (KmtIsMultiProcessorBuild) \
|
||||||
{ \
|
{ \
|
||||||
ok_eq_bool(Ret, (Value) == 0); \
|
ok_eq_bool(Ret, (Value) == 0); \
|
||||||
|
|
|
@ -314,8 +314,7 @@
|
||||||
#endif /* DEPRECATE_DDK_FUNCTIONS */
|
#endif /* DEPRECATE_DDK_FUNCTIONS */
|
||||||
|
|
||||||
/* Use to silence unused variable warnings when it is intentional */
|
/* Use to silence unused variable warnings when it is intentional */
|
||||||
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
#define UNREFERENCED_PARAMETER(P) ((void)(P))
|
||||||
#define UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
|
|
||||||
#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
#define DBG_UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
||||||
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
|
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L) ((void)(L))
|
||||||
|
|
||||||
|
|
|
@ -4262,7 +4262,7 @@ VOID
|
||||||
MemoryBarrier(VOID)
|
MemoryBarrier(VOID)
|
||||||
{
|
{
|
||||||
LONG Barrier, *Dummy = &Barrier;
|
LONG Barrier, *Dummy = &Barrier;
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Dummy);
|
(VOID)Dummy;
|
||||||
__asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory");
|
__asm__ __volatile__("xchgl %%eax, %[Barrier]" : : [Barrier] "m" (Barrier) : "memory");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -52,7 +52,7 @@ VOID
|
||||||
KeMemoryBarrier(VOID)
|
KeMemoryBarrier(VOID)
|
||||||
{
|
{
|
||||||
LONG Barrier, *Dummy = &Barrier;
|
LONG Barrier, *Dummy = &Barrier;
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Dummy);
|
(VOID)Dummy;
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
__asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax");
|
__asm__ __volatile__ ("xchg %%eax, %0" : : "m" (Barrier) : "%eax");
|
||||||
|
|
|
@ -1477,14 +1477,10 @@ VideoPortAcquireDeviceLock(
|
||||||
IN PVOID HwDeviceExtension)
|
IN PVOID HwDeviceExtension)
|
||||||
{
|
{
|
||||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||||
NTSTATUS Status;
|
|
||||||
|
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
|
||||||
|
|
||||||
TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
|
TRACE_(VIDEOPRT, "VideoPortAcquireDeviceLock\n");
|
||||||
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
||||||
Status = KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive,
|
KeWaitForMutexObject(&DeviceExtension->DeviceLock, Executive, KernelMode, FALSE, NULL);
|
||||||
KernelMode, FALSE, NULL);
|
|
||||||
// ASSERT(Status == STATUS_SUCCESS);
|
// ASSERT(Status == STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1497,13 +1493,10 @@ VideoPortReleaseDeviceLock(
|
||||||
IN PVOID HwDeviceExtension)
|
IN PVOID HwDeviceExtension)
|
||||||
{
|
{
|
||||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||||
LONG Status;
|
|
||||||
|
|
||||||
UNREFERENCED_LOCAL_VARIABLE(Status);
|
|
||||||
|
|
||||||
TRACE_(VIDEOPRT, "VideoPortReleaseDeviceLock\n");
|
TRACE_(VIDEOPRT, "VideoPortReleaseDeviceLock\n");
|
||||||
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
|
||||||
Status = KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
|
KeReleaseMutex(&DeviceExtension->DeviceLock, FALSE);
|
||||||
//ASSERT(Status == STATUS_SUCCESS);
|
//ASSERT(Status == STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ UserDerefObjectCo(PVOID obj)
|
||||||
PTHREADINFO W32Thread;
|
PTHREADINFO W32Thread;
|
||||||
PSINGLE_LIST_ENTRY ReferenceEntry;
|
PSINGLE_LIST_ENTRY ReferenceEntry;
|
||||||
PUSER_REFERENCE_ENTRY UserReferenceEntry;
|
PUSER_REFERENCE_ENTRY UserReferenceEntry;
|
||||||
UNREFERENCED_LOCAL_VARIABLE(UserReferenceEntry);
|
|
||||||
|
|
||||||
ASSERT(obj != NULL);
|
ASSERT(obj != NULL);
|
||||||
W32Thread = PsGetCurrentThreadWin32Thread();
|
W32Thread = PsGetCurrentThreadWin32Thread();
|
||||||
|
|
Loading…
Reference in a new issue