Clang 15 build error for gimp-2.10.32 (maybe 2.99.12): file-dicom.c: error: incompatible pointer to integer conversion
Due to several changes in Clang 15 (discussed in #8649 (closed)) there is additional related build error. Please refer Gentoo issue https://bugs.gentoo.org/875413 for more details.
clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/sysprof-4 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -pthread -I/usr/include/gegl-0.4 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -pthread -I/usr/include/babl-0.1 -I/usr/include -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -fno-strict-aliasing -pipe -march=native -fno-diagnostics-color -O2 -Werror=implicit-function-declaration -Werror=implicit-int -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wstrict-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -Wmissing-format-attribute -Wformat-security -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -c -o file_dicom-file-dicom.o `test -f 'file-dicom.c' || echo './'`file-dicom.c
file-dicom.c:605:26: error: incompatible pointer to integer conversion returning
'void *' from a function with result type 'gint32' (aka 'int')
[-Wint-conversion]
return NULL;
^~~~
/usr/lib/llvm/15/bin/../../../../lib/clang/15.0.2/include/stddef.h:89:16: note:
expanded from macro 'NULL'
# define NULL ((void*)0)
^~~~~~~~~~
file-dicom.c:1015:33: warning: 'g_memdup' is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup (value, element_length));
^
/usr/include/glib-2.0/glib/gstrfuncs.h:258:1: note: 'g_memdup' has been
explicitly marked deprecated here
GLIB_DEPRECATED_IN_2_68_FOR (g_memdup2)