kernel32: Remove unused variable
Vitaliy Margolen
wine-devel at kievinfo.com
Sun Sep 19 15:51:36 CDT 2010
On 09/19/2010 01:47 AM, Luca Bennati wrote:
>
> Found with scan-build provided by clang/llvm
>
> diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c
> index dcd5b85..a10bb6c 100644
> --- a/dlls/kernel32/virtual.c
> +++ b/dlls/kernel32/virtual.c
> @@ -648,17 +648,13 @@ BOOL WINAPI IsBadReadPtr( LPCVOID ptr, UINT size )
> __TRY
> {
> volatile const char *p = ptr;
> - char dummy;
> UINT count = size;
>
> while (count > page_size)
> {
> - dummy = *p;
> p += page_size;
> count -= page_size;
> }
> - dummy = p[0];
> - dummy = p[count - 1];
You can't do that. That's the whole point of this function - to test if
particular address is readable.
Vitaliy.
More information about the wine-devel
mailing list