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

Cleanup warnings in security native code

    Details

    • Subcomponent:
    • Resolved In Build:
      b65
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        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':
        ........

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jzavgren John Zavgren (Inactive)
                  Reporter:
                  chegar Chris Hegarty
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: