diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-05-30 13:55:33 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-05-30 13:55:33 +0100 |
commit | 7eb29a1fb0c6877dc205f6a6b2223f3f36bd1bf8 (patch) | |
tree | 15b66df5ca53f3141ce66c13e27133f12eda9ac9 | |
parent | 68f4ea5b0fa3d688a4ce15e0097c7ca25b9a6cb9 (diff) | |
download | gdk-pixbuf-7eb29a1fb0c6877dc205f6a6b2223f3f36bd1bf8.tar.gz |
jasper: Avoid a deprecation warning
The jas_stream_memopen() function uses any non-negative buffer size with
a NULL buffer to signify that the buffer will be allocated internally
and set to grow as needed. In the future, jas_stream_memopen() will be
replaced by a function that takes a size_t instead of a signed integer.
Passing -1 as the buffer size trips a run time deprecation warning, so
we can just use 0 and keep compatibility between the old libjasper and
newer versions.
Closes: #73
-rw-r--r-- | gdk-pixbuf/io-jasper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-jasper.c b/gdk-pixbuf/io-jasper.c index d3b26bb5e..b495f652b 100644 --- a/gdk-pixbuf/io-jasper.c +++ b/gdk-pixbuf/io-jasper.c @@ -67,7 +67,7 @@ jasper_image_begin_load (GdkPixbufModuleSizeFunc size_func, jas_init (); - stream = jas_stream_memopen (NULL, -1); + stream = jas_stream_memopen (NULL, 0); if (!stream) { g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, _("Couldn’t allocate memory for stream")); |