JDK-8001579 : Cleanup warnings in security native code
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-10-25
  • Updated: 2015-08-06
  • Resolved: 2012-11-07
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 7 JDK 8
7u76Fixed 8 b65Fixed
Related Reports
Duplicate :  
Relates :  
Description
The new build system makes native code warnings even more obvious than before. The native code for the security providers is very noisy, these files in particular:

  src/share/native/sun/security/jgss/wrapper/GSSLibStub.c
  src/share/native/sun/security/jgss/wrapper/NativeUtil.c
  src/solaris/native/sun/security/pkcs11/j2secmod_md.c
  src/share/native/sun/security/pkcs11/wrapper/p11_*.c 
  src/solaris/native/sun/security/pkcs11/j2secmod_md.c

These warnings, of course, can be seen with the old build too. 

This issue is requesting that a full build of the jdk on all unix platforms be mainly warning free in the security area. Here's what to do:

 1) build the jdk on all systems, you can use JPRT
 2) look at the build logs and search for the files named above
 3) analyze and fix the warnings
 4) goto 1. until all warnings from these files are fixed.

Snippet of the warnings on Linux/gcc:

../../../../../src/share/native/sun/security/jgss/wrapper/NativeUtil.c: In function 'getGSSTime':
../../../../../src/share/native/sun/security/jgss/wrapper/NativeUtil.c:415: warning: comparison between signed and unsigned
../../../../../src/share/native/sun/security/jgss/wrapper/NativeUtil.c: In function 'getMinorMessage':
../../../../../src/share/native/sun/security/jgss/wrapper/NativeUtil.c:485: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_getMechPtr':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:88: warning: comparison between signed and unsigned
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:90: warning: comparison between signed and unsigned
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:101: warning: return makes integer from pointer without a cast
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:102: warning: return makes integer from pointer without a cast
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:103: warning: return makes integer from pointer without a cast
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_inquireNamesForMech':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:247: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_releaseName':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:276: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_importName':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:322: warning: cast from pointer to integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_compareName':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:342: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:343: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_canonicalizeName':
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:373: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:378: warning: cast to pointer from integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c:394: warning: cast from pointer to integer of different size
../../../../../src/share/native/sun/security/jgss/wrapper/GSSLibStub.c: In function 'Java_sun_security_jgss_wrapper_GSSLibStub_exportName':
........