As seen on the Cairo webpages, http://cairographics.org/manual/cairo-png-functions.html the type "cairo_write_func_t" is described as follows: cairo_status_t (*cairo_write_func_t) (void *closure, unsigned char *data, unsigned int length); However, using this for the callback caused a compiler warning. Looking at the header file, the second argument should be "const unsigned char * data".
It's a bug in gtk-doc. I've attached a patch at https://bugzilla.gnome.org/show_bug.cgi?id=638330 To resolve the cairo bug the docs on the website need to be generated using a patched gtk-doc. Should I generate the docs and attach them to this bugreport?
Looks like upstream accepted the error as theirs and fixed it in 2011. The URL for the cairo documentation has changed, but looks like it's showing const now as expected. https://www.cairographics.org/manual/cairo-PNG-Support.html#cairo-write-func-t
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.