diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-24 14:35:47 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-24 14:35:47 +0100 |
| commit | be0f06e79116f8dae021be112963fdfac2fec74f (patch) | |
| tree | 95ef2c771aa0fc4b2eda59feeb939ed011674b1f /src/Fl_SVG_Image.cxx | |
| parent | c1ba9f31ec3a1a53a1d257068f50a7be52f995c3 (diff) | |
Remove two "warning: pointer xxx used after void* realloc()" messages
Diffstat (limited to 'src/Fl_SVG_Image.cxx')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
