Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8219142

Remove unused JIMAGE_ResourcePath

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b09

      Description

      GCC 8.2 generates warnings for a the uses of strncpy in ImageFileReader::location_path (libjimage/imageFile.cpp):

      libjimage/imageFile.cpp:502:16: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
               strncpy(next, module, length); next += length;
               ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

      The code in question is only used by JIMAGE_ResourcePath, and that function is in itself unused so should be removed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikael Mikael Vidstedt
                Reporter:
                mikael Mikael Vidstedt
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: