Workaround wrong analyze by GCC analyzer

This commit is contained in:
Patrick Pelissier committed 2025-05-07 21:02:24 +02:00
1 parent fb3140e645
commit 174c62015b
1 file changed
+3 -2
+3 -2
View File
@@ -46,8 +46,9 @@ static inline void *overloaded_realloc(size_t st, void *ptr, size_t o, size_t n)
assert(p[1] == o);
amount_allocated -= st * o;
}
p = (size_t *) realloc(p, 2*sizeof(size_t) + st * n);
assert(p != NULL);
ptr = realloc((void*)p, 2*sizeof(size_t) + st * n);
assert(ptr != NULL);
p = (size_t*) ptr;
p[0] = st;
p[1] = n;
amount_allocated += st * n;