Author: tkreuzer
Date: Sat Jul 20 12:12:13 2013
New Revision: 59538
URL:
http://svn.reactos.org/svn/reactos?rev=59538&view=rev
Log:
[WIN32K] Modify DBG_LOGEVENT to reference the parameter variable in non-logging mode,
bring back cRefs variable in GDIOBJ_vReferenceObjectByPointer
Modified:
trunk/reactos/win32ss/gdi/ntgdi/gdidebug.h
trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdidebug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdidebug…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdidebug.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdidebug.h [iso-8859-1] Sat Jul 20 12:12:13 2013
@@ -47,7 +47,7 @@
#define DBG_DUMP_EVENT_LIST(pslh) DbgDumpEventList(pslh)
#define DBG_CLEANUP_EVENT_LIST(pslh) DbgCleanupEventList(pslh)
#else
-#define DBG_LOGEVENT(pslh, type, val)
+#define DBG_LOGEVENT(pslh, type, val) ((void)(val))
#define DBG_INITLOG(pslh)
#define DBG_DUMP_EVENT_LIST(pslh)
#define DBG_CLEANUP_EVENT_LIST(pslh)
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/gdiobj.c [iso-8859-1] Sat Jul 20 12:12:13 2013
@@ -570,18 +570,20 @@
NTAPI
GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
{
+ ULONG cRefs;
+
/* Check if the object has a handle */
if (GDI_HANDLE_GET_INDEX(pobj->hHmgr))
{
/* Increase the handle's reference count */
ULONG ulIndex = GDI_HANDLE_GET_INDEX(pobj->hHmgr);
ASSERT((gpaulRefCount[ulIndex] & REF_MASK_COUNT) > 0);
- InterlockedIncrement((LONG*)&gpaulRefCount[ulIndex]);
+ cRefs = InterlockedIncrement((LONG*)&gpaulRefCount[ulIndex]);
}
else
{
/* Increase the object's reference count */
- InterlockedIncrement((LONG*)&pobj->ulShareCount);
+ cRefs = InterlockedIncrement((LONG*)&pobj->ulShareCount);
}
DBG_LOGEVENT(&pobj->slhLog, EVENT_REFERENCE, cRefs);