Hello Andrew !
Thank you for pointing out my fault macro !
After this fix valgrind does not report any error.
Cheers !
On 3/8/20 22:26, Andrew Makhorin wrote:
On Mon, 2020-08-03 at 20:45 +0200, Heinrich Schuchardt wrote:
On 03.08.20 17:56, Domingo Alvarez Duarte wrote:
[...]
+#if defined(GLP_NO_MEMORY_POOL)
+#define xrealloc(ptr, n, size) realloc(ptr, n*size)
+#define trealloc(ptr, n, type) ((type *)realloc(ptr,
n*sizeof(type)))
You need to protect macro arguments by parentheses like this:
+#define xrealloc(ptr, n, size) realloc(ptr, (n)*(size))
because n and size can be expressions.