[Bug 271520] graphics/sdl_image: fix build with clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 19 May 2023 20:16:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271520 Bug ID: 271520 Summary: graphics/sdl_image: fix build with clang 16 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: amdmi3@FreeBSD.org Reporter: dim@FreeBSD.org Flags: maintainer-feedback?(amdmi3@FreeBSD.org) Assignee: amdmi3@FreeBSD.org Clang 16 has a new error about incompatible function types, which shows up when building graphics/sdl_image: IMG_png.c:266:30: error: incompatible function pointer types assigning to 'png_infop (*)(png_structp)' (aka 'struct png_info_def *(*)(struct png_struct_def *)') from 'png_infop (png_const_structrp)' (aka 'struct png_info_def *(const struct png_struct_def *restrict)') [-Wincompatible-function-pointer-types] lib.png_create_info_struct = png_create_info_struct; ^ ~~~~~~~~~~~~~~~~~~~~~~ IMG_png.c:269:20: error: incompatible function pointer types assigning to 'png_uint_32 (*)(png_structp, png_infop, png_uint_32 *, png_uint_32 *, int *, int *, int *, int *, int *)' (aka 'unsigned int (*)(struct png_struct_def *, struct png_info_def *, unsigned int *, unsigned int *, int *, int *, int *, int *, int *)') from 'png_uint_32 (png_const_structrp, png_const_inforp, png_uint_32 *, png_uint_32 *, int *, int *, int *, int *, int *)' (aka 'unsigned int (const struct png_struct_def *restrict, const struct png_info_def *restrict, unsigned int *, unsigned int *, int *, int *, int *, int *, int *)') [-Wincompatible-function-pointer-types] lib.png_get_IHDR = png_get_IHDR; ^ ~~~~~~~~~~~~ Similar errors occur for IMG_webp.c. I backported a few changes from SDL_image 2 that fix the prototypes to be compatible with the versions of graphics/png and and graphics/webp. -- You are receiving this mail because: You are the assignee for the bug.