错误信息:
In function ‘AllocString’,
inlined from ‘SetData’ at /home/yeqiang/Downloads/openjdk-jdk-14-23/src/java.desktop/share/native/liblcms/cmscgats.c:1586:47,
inlined from ‘cmsIT8SetDataRowCol’ at /home/yeqiang/Downloads/openjdk-jdk-14-23/src/java.desktop/share/native/liblcms/cmscgats.c:2613:12:
/home/yeqiang/Downloads/openjdk-jdk-14-23/src/java.desktop/share/native/liblcms/cmscgats.c:1146:14: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
1146 | if (ptr) strncpy (ptr, str, Size-1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/yeqiang/Downloads/openjdk-jdk-14-23/src/java.desktop/share/native/liblcms/cmscgats.c: In function ‘cmsIT8SetDataRowCol’:
/home/yeqiang/Downloads/openjdk-jdk-14-23/src/java.desktop/share/native/liblcms/cmscgats.c:1141:46: note: length computed here
1141 | cmsUInt32Number Size = (cmsUInt32Number) strlen(str)+1;
| ^~~~~~~~~~~
添加gcc编译参数 -Wno-stringop-truncation