mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
571 stars 176 forks source link

FTBFS with mingw GCC 14 #456

Closed nanake closed 3 months ago

nanake commented 3 months ago
[root@4127848ed761 build]# ninja -j4
[48/68] Compiling C object testbed/testcms.exe.p/testplugin.c.obj
FAILED: testbed/testcms.exe.p/testplugin.c.obj
x86_64-w64-mingw32ucrt-gcc -Itestbed/testcms.exe.p -Itestbed -I../testbed -Iinclude -I../include -Isrc -I../src -I/opt/ffbuild/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -static-libgcc -static-libstdc++ -O3 -pipe -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fno-semantic-interposition -D_POSIX_C_SOURCE=199503L -DHAVE_GMTIME_R=1 -DHasTHREADS=1 -DHAVE_TIMESPEC_GET=1 -MD -MQ testbed/testcms.exe.p/testplugin.c.obj -MF testbed/testcms.exe.p/testplugin.c.obj.d -o testbed/testcms.exe.p/testplugin.c.obj -c ../testbed/testplugin.c
../testbed/testplugin.c:810:52: error: initialization of 'struct _cmsPluginBaseStruct *' from incompatible pointer type 'cmsPluginTag *' [-Wincompatible-pointer-types]
  810 |     { cmsPluginMagicNumber, 2060, cmsPluginTagSig, &HiddenTagPluginSample},
      |                                                    ^
../testbed/testplugin.c:810:52: note: (near initialization for 'HiddenTagPluginSample2.base.Next')
[49/68] Compiling C object testbed/testcms.exe.p/zoo_icc.c.obj
../testbed/zoo_icc.c: In function 'ReadAllRAWTags':
../testbed/zoo_icc.c:63:20: warning: variable 'len' set but not used [-Wunused-but-set-variable]
   63 |     cmsInt32Number len;
      |                    ^~~
[50/68] Compiling C object plugins/fast_float/testbed/fast_float_testbed.exe.p/fast_float_testbed.c.obj
../plugins/fast_float/testbed/fast_float_testbed.c: In function 'CheckSingleFormatter15':
../plugins/fast_float/testbed/fast_float_testbed.c:122:40: warning: variable 'bytes' set but not used [-Wunused-but-set-variable]
  122 |        cmsInt32Number i, j, nChannels, bytes;
      |                                        ^~~~~
../plugins/fast_float/testbed/fast_float_testbed.c: At top level:
../plugins/fast_float/testbed/fast_float_testbed.c:1661:18: warning: 'SpeedTest15bitsRGBA' defined but not used [-Wunused-function]
 1661 | cmsFloat64Number SpeedTest15bitsRGBA(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
      |                  ^~~~~~~~~~~~~~~~~~~
../plugins/fast_float/testbed/fast_float_testbed.c:1570:18: warning: 'SpeedTest8bitsRGBA' defined but not used [-Wunused-function]
 1570 | cmsFloat64Number SpeedTest8bitsRGBA(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
      |                  ^~~~~~~~~~~~~~~~~~
../plugins/fast_float/testbed/fast_float_testbed.c:1218:9: warning: 'ValidFloat2' defined but not used [-Wunused-function]
 1218 | cmsBool ValidFloat2(cmsFloat32Number a, cmsFloat32Number b)
      |         ^~~~~~~~~~~
../plugins/fast_float/testbed/fast_float_testbed.c:1074:6: warning: 'CheckLab2Roundtrip' defined but not used [-Wunused-function]
 1074 | void CheckLab2Roundtrip(void)
      |      ^~~~~~~~~~~~~~~~~~
[51/68] Compiling C object testbed/testcms.exe.p/testcms2.c.obj
../testbed/testcms2.c:5205:16: warning: 'CheckDictionary16' defined but not used [-Wunused-function]
 5205 | cmsInt32Number CheckDictionary16(cmsInt32Number Pass,  cmsHPROFILE hProfile)
      |                ^~~~~~~~~~~~~~~~~
../testbed/testcms2.c: In function 'Check1D.constprop':
../testbed/testcms2.c:1033:9: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 1033 |     p = _cmsComputeInterpParams(DbgThread(), nNodesToCheck, 1, 1, Tab, CMS_LERP_FLAGS_16BITS);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../testbed/testcms2.h:30,
                 from ../testbed/testcms2.c:27:
../src/lcms2_internal.h:868:42: note: by argument 5 of type 'const void *' to '_cmsComputeInterpParams' declared here
  868 | CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
../testbed/testcms2.c: In function 'Check1D.constprop':
../testbed/testcms2.c:1033:9: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 1033 |     p = _cmsComputeInterpParams(DbgThread(), nNodesToCheck, 1, 1, Tab, CMS_LERP_FLAGS_16BITS);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lcms2_internal.h:868:42: note: by argument 5 of type 'const void *' to '_cmsComputeInterpParams' declared here
  868 | CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
../testbed/testcms2.c: In function 'Check1D.constprop':
../testbed/testcms2.c:1033:9: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 1033 |     p = _cmsComputeInterpParams(DbgThread(), nNodesToCheck, 1, 1, Tab, CMS_LERP_FLAGS_16BITS);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lcms2_internal.h:868:42: note: by argument 5 of type 'const void *' to '_cmsComputeInterpParams' declared here
  868 | CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
../testbed/testcms2.c: In function 'Check1D.constprop':
../testbed/testcms2.c:1033:9: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 1033 |     p = _cmsComputeInterpParams(DbgThread(), nNodesToCheck, 1, 1, Tab, CMS_LERP_FLAGS_16BITS);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lcms2_internal.h:868:42: note: by argument 5 of type 'const void *' to '_cmsComputeInterpParams' declared here
  868 | CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
In function 'Check1D',
    inlined from 'Check1DLERP4' at ../testbed/testcms2.c:1079:12:
../testbed/testcms2.c:1033:9: warning: '<unknown>' may be used uninitialized [-Wmaybe-uninitialized]
 1033 |     p = _cmsComputeInterpParams(DbgThread(), nNodesToCheck, 1, 1, Tab, CMS_LERP_FLAGS_16BITS);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lcms2_internal.h: In function 'Check1DLERP4':
../src/lcms2_internal.h:868:42: note: by argument 5 of type 'const void *' to '_cmsComputeInterpParams' declared here
  868 | CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.