8135099: 9-dev solaris builds failed on 2015-09-04
authorvaleriep
Tue, 08 Sep 2015 22:14:25 +0000
changeset 32499 0a653603f68f
parent 32498 45f473f2896c
child 32500 164fa1c0bad8
child 32506 9362d0b4e2df
child 32673 413efa102b75
8135099: 9-dev solaris builds failed on 2015-09-04 Summary: Fixed the compilation warning which broken the build. Reviewed-by: vinnie
jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c
--- a/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Tue Sep 08 11:47:07 2015 -0700
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/native/libj2ucrypto/nativeCrypto.c	Tue Sep 08 22:14:25 2015 +0000
@@ -430,17 +430,18 @@
  * Signature: (JZ[BI)I
  */
 jint JavaCritical_com_oracle_security_ucrypto_NativeCipher_nativeFinal
-  (jlong pContext, jboolean encrypt, int outLen, jbyte* bufOut, jint outOfs) {
+  (jlong pContext, jboolean encrypt, int outLen, jbyte* out, jint outOfs) {
   crypto_ctx_t *context;
   int rv = 0;
+  unsigned char* bufOut = (unsigned char*) out;
 
   context = (crypto_ctx_t *) pContext;
   // Avoid null output buffer to workaround Solaris bug21481818 (fixed in S12)
   if (bufOut == NULL) {
-    bufOut = (unsigned char *)(&outLen);
+    bufOut = (unsigned char*)(&outLen);
     outLen = 0;
   }
-  rv = CipherFinal(context, encrypt, (unsigned char*)bufOut, outOfs, &outLen);
+  rv = CipherFinal(context, encrypt, bufOut, outOfs, &outLen);
   free(context);
   if (rv) {
      return -rv; // use negative value to indicate error!