[ros-dev] [ros-diffs] [dgorbachev] 43333: Fix GCC 4.1.3 warning.

Alex Ionescu ionucu at videotron.ca
Thu Oct 8 00:30:44 CEST 2009


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 at 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=43333&r1=43332&r2=43333&view=diff
> ==============================================================================
> --- 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);
>     }
>  }
>
>
>
>



More information about the Ros-dev mailing list