JDK-8219142 : Remove unused JIMAGE_ResourcePath
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jlink
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-02-15
  • Updated: 2021-05-06
  • Resolved: 2019-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.12Fixed 13 b09Fixed
Related Reports
Relates :  
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.
Comments
Fix Request (11u) The build warning also shows up when trying to build 11u with GCC 8. Fix only removes dead code and applies cleanly.
05-05-2021