# HG changeset patch # User stuefe # Date 1553518227 -3600 # Mon Mar 25 13:50:27 2019 +0100 # Node ID b1d99c93effd8fc9febf0260cb3beb0632d8e40d # Parent aa937fac07f38a91ac4938dd82b42a35c294ed21 [mq]: 8221408-win32-hotspot-buildfixes diff --git a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp --- a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp +++ b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp @@ -465,6 +465,9 @@ } #ifndef AMD64 +// Ignore "C4172: returning address of local variable or temporary" +#pragma warning(push) +#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 --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -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 --git a/src/hotspot/share/runtime/vmStructs.hpp b/src/hotspot/share/runtime/vmStructs.hpp --- a/src/hotspot/share/runtime/vmStructs.hpp +++ b/src/hotspot/share/runtime/vmStructs.hpp @@ -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 },