# HG changeset patch # User stuefe # Date 1553458739 -3600 # Sun Mar 24 21:18:59 2019 +0100 # Node ID c9a698545f7afd1b2bbb5c0a194234e12acf73fd # Parent aa937fac07f38a91ac4938dd82b42a35c294ed21 [mq]: buildfixes-32-2 diff -r aa937fac07f3 -r c9a698545f7a src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp --- a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp Sat Mar 23 17:18:49 2019 +0100 +++ b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp Sun Mar 24 21:18:59 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -465,6 +465,9 @@ } #ifndef AMD64 +#pragma warning(push) +// Ignore "C4172: returning address of local variable or temporary" +#pragma warning(disable : 4172) // Returns an estimate of the current stack pointer. Result must be guaranteed // to point into the calling threads stack, and be no lower than the current // stack pointer. @@ -473,6 +476,7 @@ address sp = (address)&dummy; return sp; } +#pragma warning(pop) #else // Returns the current stack pointer. Accurate value needed for // os::verify_stack_alignment(). diff -r aa937fac07f3 -r c9a698545f7a src/hotspot/share/classfile/classFileParser.cpp --- a/src/hotspot/share/classfile/classFileParser.cpp Sat Mar 23 17:18:49 2019 +0100 +++ b/src/hotspot/share/classfile/classFileParser.cpp Sun Mar 24 21:18:59 2019 +0100 @@ -312,7 +312,7 @@ const char* const str = java_lang_String::as_utf8_string(patch()); // (could use java_lang_String::as_symbol instead, but might as well batch them) utf8_buffer = (const u1*) str; - utf8_length = (int) strlen(str); + utf8_length = (u2) strlen(str); } unsigned int hash; diff -r aa937fac07f3 -r c9a698545f7a src/hotspot/share/oops/markOop.hpp --- a/src/hotspot/share/oops/markOop.hpp Sat Mar 23 17:18:49 2019 +0100 +++ b/src/hotspot/share/oops/markOop.hpp Sun Mar 24 21:18:59 2019 +0100 @@ -26,6 +26,7 @@ #define SHARE_OOPS_MARKOOP_HPP #include "oops/oop.hpp" +#include "utilities/globalDefinitions.hpp" // The markOop describes the header of an object. // diff -r aa937fac07f3 -r c9a698545f7a src/hotspot/share/runtime/vmStructs.hpp --- a/src/hotspot/share/runtime/vmStructs.hpp Sat Mar 23 17:18:49 2019 +0100 +++ b/src/hotspot/share/runtime/vmStructs.hpp Sun Mar 24 21:18:59 2019 +0100 @@ -272,7 +272,7 @@ // #define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \ - { QUOTE(name), name }, + { QUOTE(name), (uint64_t)name }, #define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \ { name, value }, diff -r aa937fac07f3 -r c9a698545f7a src/java.base/windows/native/libnet/NetworkInterface_winXP.c --- a/src/java.base/windows/native/libnet/NetworkInterface_winXP.c Sat Mar 23 17:18:49 2019 +0100 +++ b/src/java.base/windows/native/libnet/NetworkInterface_winXP.c Sun Mar 24 21:18:59 2019 +0100 @@ -41,7 +41,7 @@ #ifdef _WIN64 printf ("nif:0x%I64x name:%s\n", (UINT_PTR)nif, nif->name); #else - printf ("nif:0x%x name:%s\n", nif, nif->name); + printf ("nif:0x%x name:%s\n", (UINT_PTR)nif, nif->name); #endif if (nif->dNameIsUnicode) { printf ("dName:%S index:%d ", (unsigned short *)nif->displayName, diff -r aa937fac07f3 -r c9a698545f7a src/java.desktop/share/native/common/awt/debug/debug_trace.c --- a/src/java.desktop/share/native/common/awt/debug/debug_trace.c Sat Mar 23 17:18:49 2019 +0100 +++ b/src/java.desktop/share/native/common/awt/debug/debug_trace.c Sun Mar 24 21:18:59 2019 +0100 @@ -25,7 +25,7 @@ #include "debug_util.h" -static void DTrace_PrintStdErr(const char *msg); +static void JNICALL DTrace_PrintStdErr(const char *msg); #if defined(DEBUG) enum { @@ -298,7 +298,7 @@ * Support for Java tracing in release or debug mode builds */ -static void DTrace_PrintStdErr(const char *msg) { +static void JNICALL DTrace_PrintStdErr(const char *msg) { fprintf(stderr, "%s", msg); fflush(stderr); } diff -r aa937fac07f3 -r c9a698545f7a src/java.desktop/share/native/common/awt/debug/debug_trace.h --- a/src/java.desktop/share/native/common/awt/debug/debug_trace.h Sat Mar 23 17:18:49 2019 +0100 +++ b/src/java.desktop/share/native/common/awt/debug/debug_trace.h Sun Mar 24 21:18:59 2019 +0100 @@ -45,10 +45,10 @@ }; /* prototype for client provided output callback function */ -typedef void (*DTRACE_OUTPUT_CALLBACK)(const char * msg); +typedef void (JNICALL *DTRACE_OUTPUT_CALLBACK)(const char * msg); /* prototype for client provided print callback function */ -typedef void (*DTRACE_PRINT_CALLBACK)(const char * file, int line, int argc, const char * fmt, va_list arglist); +typedef void (JNICALL *DTRACE_PRINT_CALLBACK)(const char * file, int line, int argc, const char * fmt, va_list arglist); extern void DTrace_EnableAll(dbool_t enabled); extern void DTrace_EnableFile(const char * file, dbool_t enabled); diff -r aa937fac07f3 -r c9a698545f7a src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp --- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Sat Mar 23 17:18:49 2019 +0100 +++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Sun Mar 24 21:18:59 2019 +0100 @@ -502,7 +502,7 @@ else { if ((dwKeySpec & CERT_NCRYPT_KEY_SPEC) == CERT_NCRYPT_KEY_SPEC) { - PP("CNG %I64d", hCryptProv); + PP("CNG %I64d", (__int64)hCryptProv); } else { // Private key is available BOOL bGetUserKey = ::CryptGetUserKey(hCryptProv, dwKeySpec, &hUserKey); //deprecated @@ -517,7 +517,7 @@ // Set cipher mode to ECB DWORD dwCipherMode = CRYPT_MODE_ECB; ::CryptSetKeyParam(hUserKey, KP_MODE, (BYTE*)&dwCipherMode, NULL); //deprecated - PP("CAPI %I64d %I64d", hCryptProv, hUserKey); + PP("CAPI %I64d %I64d", (__int64)hCryptProv, (__int64)hUserKey); } // If the private key is present in smart card, we may not be able to // determine the key length by using the private key handle. However, @@ -863,8 +863,8 @@ SS_CHECK(::NCryptTranslateHandle( NULL, &hk, - hCryptProv, - hCryptKey, + (HCRYPTPROV)hCryptProv, + (HCRYPTKEY)hCryptKey, NULL, 0)); } @@ -1087,8 +1087,8 @@ SS_CHECK(::NCryptTranslateHandle( NULL, &hk, - hCryptProv, - hCryptKey, + (HCRYPTPROV)hCryptProv, + (HCRYPTKEY)hCryptKey, NULL, 0)); } @@ -1920,7 +1920,7 @@ // Determine the size of the blob if (hCryptKey == 0) { SS_CHECK(::NCryptExportKey( - hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, + (NCRYPT_KEY_HANDLE)hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, NULL, 0, &dwBlobLen, NCRYPT_SILENT_FLAG)); } else { if (! ::CryptExportKey((HCRYPTKEY) hCryptKey, 0, PUBLICKEYBLOB, 0, NULL, //deprecated @@ -1939,7 +1939,7 @@ // Generate key blob if (hCryptKey == 0) { SS_CHECK(::NCryptExportKey( - hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, + (NCRYPT_KEY_HANDLE)hCryptProv, NULL, BCRYPT_ECCPUBLIC_BLOB, NULL, pbKeyBlob, dwBlobLen, &dwBlobLen, NCRYPT_SILENT_FLAG)); } else { if (! ::CryptExportKey((HCRYPTKEY) hCryptKey, 0, PUBLICKEYBLOB, 0, //deprecated