Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8220070 Clean up GCC 8.3 errors
  3. JDK-8220074

Clean up GCC 8.3 errors in LittleCMS

XMLWordPrintable

    • 2d
    • b24

        Few pieces of GCC 8.3 output:

        src/java.desktop/share/native/liblcms/cmscgats.c: In function ‘GetVal’:
        src/java.desktop/share/native/liblcms/cmscgats.c:1021:19: error: ‘strncpy’ output may be truncated copying between 255 and 1023 bytes from a string of length 1023 [-Werror=stringop-truncation]
             case SSTRING: strncpy(Buffer, it8->str, max);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        In function ‘AllocString’,
            inlined from ‘AddToList.constprop’ at src/java.desktop/share/native/liblcms/cmscgats.c:1219:22:
        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]
             if (ptr) strncpy (ptr, str, Size-1);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
        src/java.desktop/share/native/liblcms/cmscgats.c: In function ‘AddToList.constprop’:
        src/java.desktop/share/native/liblcms/cmscgats.c:1141:46: note: length computed here
             cmsUInt32Number Size = (cmsUInt32Number) strlen(str)+1;
                                                      ^~~~~~~~~~~
        In function ‘AllocString’,
            inlined from ‘AddToList.constprop’ at src/java.desktop/share/native/liblcms/cmscgats.c:1250:22:
        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]
             if (ptr) strncpy (ptr, str, Size-1);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
        ...
        In function ‘cmsIT8SetSheetType’,
            inlined from ‘ParseIT8’ at src/java.desktop/share/native/liblcms/cmscgats.c:2144:41:
        src/java.desktop/share/native/liblcms/cmscgats.c:1370:9: error: ‘strncpy’ output may be truncated copying 1023 bytes from a string of length 1023 [-Werror=stringop-truncation]
                 strncpy(t ->SheetType, Type, MAXSTR-1);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ...

              ysuenaga Yasumasa Suenaga
              dchuyko Dmitry Chuyko
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: