gdkjpeg: include `stdlib.h` necessary for `free`
authorMosè Giordano <mose@gnu.org>
Sun, 6 Feb 2022 15:41:33 +0000 (15:41 +0000)
committerMosè Giordano <mose@gnu.org>
Sun, 6 Feb 2022 15:41:33 +0000 (15:41 +0000)
commit4c211f1872eb6b1cd937bd98dc86b571fc87f304
treef5508e60454d056c73b283522c4098a0fd41d25e
parent34959b58f4d0ded3303cc9313dc0127e93ecb5a6
gdkjpeg: include `stdlib.h` necessary for `free`

`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]
 }
 ^
```
gdk/loaders/gdkjpeg.c