lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 08 Apr 2009 15:12:10 +0100
From:	Jack Stone <jwjstone@...tmail.fm>
To:	Will Newton <will.newton@...il.com>
CC:	Bert Wesarg <bert.wesarg@...glemail.com>,
	linux-kernel@...r.kernel.org, jeff@...zik.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 20/56] inflate: Remove void casts

Will Newton wrote:
> On Wed, Apr 8, 2009 at 2:54 PM, Jack Stone <jwjstone@...tmail.fm> wrote:
>   
>>  lib/inflate.c |    5 ++---
>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/lib/inflate.c b/lib/inflate.c
>> index 1a8e8a9..1eb0cd8 100644
>> --- a/lib/inflate.c
>> +++ b/lib/inflate.c
>> @@ -249,7 +249,7 @@ static void *malloc(int size)
>>
>>        malloc_ptr = (malloc_ptr + 3) & ~3;     /* Align */
>>
>> -       p = (void *)malloc_ptr;
>> +       p = malloc_ptr;
>>        malloc_ptr += size;
>>     
>
> Won't this cause a "assignment makes pointer from integer without a
> cast" warning?
I don't think so. The cast had no effect as both malloc_ptr and p are
declared as void *. The later += size
does pointer arithmetic.

Thanks,

Jack
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ