mm2 / Little-CMS

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

gcc11: compilation warning in lcms2.14+ #458

Closed mrserb closed 1 month ago

mrserb commented 1 month ago

The next warning is produced by the gcc11(I don't test other versions) for lcms 2.14+

openjdk/jdk/src/java.desktop/share/native/liblcms/cmscgats.c: In function ‘satoi’: openjdk/jdk/src/java.desktop/share/native/liblcms/cmscgats.c:1613:11: error: comparison is always false due to limited range of data type [-Werror=type-limits] 1613 | if (n > 0x7fffffffL) return 0x7fffffffL;

The problem was found when the library was integrated into the openjdk: https://github.com/openjdk/jdk/pull/11217#discussion_r1026158611

mm2 commented 1 month ago

Thanks for reporting. A fix should come next.