From be0f06e79116f8dae021be112963fdfac2fec74f Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:35:47 +0100 Subject: Remove two "warning: pointer xxx used after void* realloc()" messages --- src/Fl_SVG_Image.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_SVG_Image.cxx') diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 7c8a6ff12..ca52a55f7 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -119,9 +119,9 @@ static char *svg_inflate(gzFile gzf, // can be a file or the read end of a pipe do { if (is_compressed && p + size > out + out_size) { out_size += size; - char *tmp = (char*)realloc(out, out_size + 1); - p = tmp + (p - out); - out = tmp; + unsigned delta = (p - out); + out = (char*)realloc(out, out_size + 1); + p = out + delta; } if ( fdwrite >= 0 && Fl::system_driver()->write_nonblocking_fd(fdwrite, bytes, rest_bytes) ) { free(out); -- cgit v1.2.3