diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2022-05-24 02:23:04 +0200 |
---|---|---|
committer | Johannes Schindelin <johannes.schindelin@gmx.de> | 2023-03-12 20:31:53 +0100 |
commit | 86f6f4fa91a9a2310c8f73528a86bf2c52d47fe4 (patch) | |
tree | 111dc0661167c52bc38adeb00e71ef2c9ff951b6 | |
parent | compat/win32/syslog: fix use-after-realloc (diff) | |
download | git-86f6f4fa91a9a2310c8f73528a86bf2c52d47fe4.tar.xz git-86f6f4fa91a9a2310c8f73528a86bf2c52d47fe4.zip |
nedmalloc: avoid new compile error
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@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | compat/nedmalloc/nedmalloc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c index 1cc31c3502..141c30f07f 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; |