Re: [PATCH 2/4] nedmalloc: avoid new compile error

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

 



On Tue, May 24 2022, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <johannes.schindelin@xxxxxx>
>
> GCC v12.x complains thusly:
>
> compat/nedmalloc/nedmalloc.c: In function 'DestroyCaches':
> compat/nedmalloc/nedmalloc.c:326:12: error: the comparison will always
>                               evaluate as 'true' for the address of 'caches'
>                               will never be NULL [-Werror=address]
>   326 |         if(p->caches)
>       |            ^
> compat/nedmalloc/nedmalloc.c:196:22: note: 'caches' declared here
>   196 |         threadcache *caches[THREADCACHEMAXCACHES];
>       |                      ^~~~~~
>
> ... and it is correct, of course.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---
>  compat/nedmalloc/nedmalloc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c
> index edb438a7776..2c0ace7075a 100644
> --- a/compat/nedmalloc/nedmalloc.c
> +++ b/compat/nedmalloc/nedmalloc.c
> @@ -323,7 +323,6 @@ static NOINLINE void RemoveCacheEntries(nedpool *p, threadcache *tc, unsigned in
>  }
>  static void DestroyCaches(nedpool *p) THROWSPEC
>  {
> -	if(p->caches)
>  	{
>  		threadcache *tc;
>  		int n;

This seems sensible, I thought "why not submit it to upstream",
i.e. see:
https://github.com/ned14/nedmalloc/blob/master/nedmalloc.c#L1298

But that repository was last updated in 2014, I wonder if it's just
because nobody's submitted a patch since then, or if it's inactive. Have
you tried making Njall Douglas (the nedmalloc author) aware of this
issue?




[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