Why are you using this bad/broken API?
Why are you doing an exchange without even checking the result?
Just use InterlockedAdd (but you're not accessing KdpFreeBytes safely
elsewhere, so again, you're just wasting time doing bad
synchronziation).
Best regards,
Alex Ionescu
On Wed, Oct 7, 2009 at 4:04 PM, <dgorbachev(a)svn.reactos.org> wrote:
Author: dgorbachev
Date: Wed Oct 7 22:04:17 2009
New Revision: 43333
URL:
http://svn.reactos.org/svn/reactos?rev=43333&view=rev
Log:
Fix GCC 4.1.3 warning.
Modified:
trunk/reactos/ntoskrnl/kd/kdio.c
Modified: trunk/reactos/ntoskrnl/kd/kdio.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdio.c?rev=433…
==============================================================================
--- trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] Wed Oct 7 22:04:17 2009
@@ -68,7 +68,7 @@
KdpDebugBuffer, end, NULL, NULL);
}
- InterlockedExchangeAddUL(&KdpFreeBytes, num);
+ (VOID)InterlockedExchangeAddUL(&KdpFreeBytes, num);
}
}