Re: [PATCH v3 2/3] win32: allow building with pedantic mode enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 03.09.21 um 22:38 schrieb René Scharfe:
> Am 03.09.21 um 22:13 schrieb Carlo Marcelo Arenas Belón:
>> On Fri, Sep 03, 2021 at 08:47:02PM +0200, René Scharfe wrote:
>>> Am 03.09.21 um 19:02 schrieb Carlo Marcelo Arenas Belón:
>>>> diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c
>>>> index 1cc31c3502..edb438a777 100644
>>>> --- a/compat/nedmalloc/nedmalloc.c
>>>> +++ b/compat/nedmalloc/nedmalloc.c
>>>> @@ -510,7 +510,7 @@ static void threadcache_free(nedpool *p, threadcache *tc, int mymspace, void *me
>>>>  	assert(idx<=THREADCACHEMAXBINS);
>>>>  	if(tck==*binsptr)
>>>>  	{
>>>> -		fprintf(stderr, "Attempt to free already freed memory block %p - aborting!\n", tck);
>>>> +		fprintf(stderr, "Attempt to free already freed memory block %p - aborting!\n", (void *)tck);
>>>
>>> This change is not mentioned in the commit message.
>>
>> got me there, I was intentionally trying to ignore it since nedmalloc gives
>> me PTSD and is obsoleted AFAIK[1], so just adding a casting to void (while
>> ugly) was also less intrusive.

Expected your [1] to stand for a footnote, and got confused when I found none.
The last commit in https://github.com/ned14/nedmalloc is from seven years ago
and this repository is archived, with the author still being active on GitHub.
Seems like nedmalloc reached its end of life.  Has there been an official
announcement?

>> strange, gcc-11 prints the following in MacOS for me:
>>
>> compat/nedmalloc/nedmalloc.c: In function 'threadcache_free':
>> compat/nedmalloc/nedmalloc.c:522:78: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'threadcacheblk *' {aka 'struct threadcacheblk_t *'} [-Wformat=]
>>   522 |                 fprintf(stderr, "Attempt to free already freed memory block %p - aborting!\n", tck);
>>       |                                                                             ~^                 ~~~
>>       |                                                                              |                 |
>>       |                                                                              void *            threadcacheblk * {aka struct threadcacheblk_t *}

I don't have GCC installed, only checked with https://godbolt.org/z/jc356vqb4

René




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux