mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
4c211f1872
`free` is defined in `stdlib.h`, see for example <https://pubs.opengroup.org/onlinepubs/009604499/functions/free.html>. Without this include compilation can fail with the following error: ``` ../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’: ../gdk/loaders/gdkjpeg.c:264:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] free (data); ^ ../gdk/loaders/gdkjpeg.c:264:7: warning: incompatible implicit declaration of built-in function ‘free’ ../gdk/loaders/gdkjpeg.c:264:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’ ../gdk/loaders/gdkjpeg.c:302:67: error: ‘free’ undeclared (first use in this function) return g_bytes_new_with_free_func (data, size, (GDestroyNotify) free, NULL); ^ ../gdk/loaders/gdkjpeg.c:302:67: note: each undeclared identifier is reported only once for each function it appears in ../gdk/loaders/gdkjpeg.c:303:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ``` |
||
---|---|---|
.. | ||
gdkjpeg.c | ||
gdkjpegprivate.h | ||
gdkpng.c | ||
gdkpngprivate.h | ||
gdktiff.c | ||
gdktiffprivate.h |