Closed kerneljake closed 5 months ago
Xcode 15.3 will fail to compile SDL_image-1.2.5/IMG_jpg.c with error incompatible function pointer types without an explicit cast.
incompatible function pointer types
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_image\" -DVERSION=\"1.2.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLOAD_JPG=1 -DLOAD_PNG=1 -DLOAD_BMP=1 -DLOAD_GIF=1 -DLOAD_LBM=1 -DLOAD_PCX=1 -DLOAD_PNM=1 -DLOAD_TGA=1 -DLOAD_XCF=1 -DLOAD_XPM=1 -DLOAD_XV=1 -I. -I. -arch arm64 -I/Users/jake/squeezeplay/build/osx/include -I/Users/jake/squeezeplay/build/osx/include/SDL -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -I/Users/jake/squeezeplay/build/osx/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -MT IMG_jpg.lo -MD -MP -MF .deps/IMG_jpg.Tpo -c IMG_jpg.c -fno-common -DPIC -o .libs/IMG_jpg.o IMG_jpg.c:342:30: error: incompatible function pointer types assigning to 'boolean (*)(j_decompress_ptr)' (aka 'boolean (*)(struct jpeg_decompress_struct *)') from 'int (j_decompress_ptr)' (aka 'int (struct jpeg_decompress_struct *)') [-Wincompatible-function-pointer-types] src->pub.fill_input_buffer = fill_input_buffer; ^ ~~~~~~~~~~~~~~~~~
M3 % gcc --version Apple Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin M3 % xcodebuild -version Xcode 15.3 Build version 15E204a
Thanks for the fix.
Xcode 15.3 will fail to compile SDL_image-1.2.5/IMG_jpg.c with error
incompatible function pointer types
without an explicit cast.