Commit 7eb29a1f authored by Emmanuele Bassi's avatar Emmanuele Bassi

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
parent 68f4ea5b
......@@ -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"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment