--- old/src/cpu/x86/vm/c1_LinearScan_x86.cpp 2017-07-02 11:30:39.000000000 +0200 +++ new/src/cpu/x86/vm/c1_LinearScan_x86.cpp 2017-07-02 11:30:39.000000000 +0200 @@ -826,6 +826,8 @@ case lir_fld: assert(false, "operations only inserted by FpuStackAllocator"); break; + default: + break; } } #endif --- old/src/cpu/x86/vm/vm_version_x86.cpp 2017-07-02 11:30:40.000000000 +0200 +++ new/src/cpu/x86/vm/vm_version_x86.cpp 2017-07-02 11:30:40.000000000 +0200 @@ -1380,7 +1380,7 @@ #endif log->cr(); log->print("Allocation"); - if (AllocatePrefetchStyle <= 0 || UseSSE == 0 && !supports_3dnow_prefetch()) { + if (AllocatePrefetchStyle <= 0 || (UseSSE == 0 && !supports_3dnow_prefetch())) { log->print_cr(": no prefetching"); } else { log->print(" prefetching: "); --- old/src/share/vm/c1/c1_InstructionPrinter.cpp 2017-07-02 11:30:40.000000000 +0200 +++ new/src/share/vm/c1/c1_InstructionPrinter.cpp 2017-07-02 11:30:40.000000000 +0200 @@ -102,6 +102,7 @@ case Bytecodes::_lor : return "|"; case Bytecodes::_ixor : // fall through case Bytecodes::_lxor : return "^"; + default : break; } return Bytecodes::name(op); } --- old/src/share/vm/c1/c1_LIR.cpp 2017-07-02 11:30:40.000000000 +0200 +++ new/src/share/vm/c1/c1_LIR.cpp 2017-07-02 11:30:40.000000000 +0200 @@ -243,6 +243,8 @@ assert(in_opr1()->is_valid() && in_opr2()->is_valid(), "must be valid"); break; + default: + break; } } #endif --- old/src/share/vm/c1/c1_LinearScan.cpp 2017-07-02 11:30:40.000000000 +0200 +++ new/src/share/vm/c1/c1_LinearScan.cpp 2017-07-02 11:30:40.000000000 +0200 @@ -2381,6 +2381,8 @@ case Bytecodes::_if_acmpne : assert(stack_end >= -Bytecodes::depth(code), "must have non-empty expression stack at if bytecode"); break; + default: + break; } } } --- old/src/share/vm/ci/ciReplay.cpp 2017-07-02 11:30:41.000000000 +0200 +++ new/src/share/vm/ci/ciReplay.cpp 2017-07-02 11:30:41.000000000 +0200 @@ -757,7 +757,7 @@ InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK); if (k == NULL || ReplaySuppressInitializers == 0 || - ReplaySuppressInitializers == 2 && k->class_loader() == NULL) { + (ReplaySuppressInitializers == 2 && k->class_loader() == NULL)) { return; } --- old/src/share/vm/classfile/vmSymbols.cpp 2017-07-02 11:30:41.000000000 +0200 +++ new/src/share/vm/classfile/vmSymbols.cpp 2017-07-02 11:30:41.000000000 +0200 @@ -892,6 +892,7 @@ case F_SN: fname = "native static "; break; case F_S: fname = "static "; break; case F_RNY:fname = "native synchronized "; break; + default: break; } const char* kptr = strrchr(kname, '/'); if (kptr != NULL) kname = kptr + 1; @@ -989,6 +990,8 @@ declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math()); if (declared_id == actual_id) return; // acceptable alias break; + default: + break; } } --- old/src/share/vm/code/nmethod.cpp 2017-07-02 11:30:41.000000000 +0200 +++ new/src/share/vm/code/nmethod.cpp 2017-07-02 11:30:41.000000000 +0200 @@ -2852,6 +2852,8 @@ st->print_cr("Static call at " INTPTR_FORMAT, p2i(iter.reloc()->addr())); CompiledDirectStaticCall::at(iter.reloc())->print(); break; + default: + break; } } } --- old/src/share/vm/code/relocInfo.cpp 2017-07-02 11:30:42.000000000 +0200 +++ new/src/share/vm/code/relocInfo.cpp 2017-07-02 11:30:42.000000000 +0200 @@ -940,6 +940,8 @@ p2i(r->destination()), p2i(r->method_value())); break; } + default: + break; } tty->cr(); } --- old/src/share/vm/gc/g1/sparsePRT.cpp 2017-07-02 11:30:42.000000000 +0200 +++ new/src/share/vm/gc/g1/sparsePRT.cpp 2017-07-02 11:30:42.000000000 +0200 @@ -120,8 +120,8 @@ "_capacity too large"); // This will put -1 == NullEntry in the key field of all entries. - memset(_entries, NullEntry, _num_entries * SparsePRTEntry::size()); - memset(_buckets, NullEntry, _capacity * sizeof(int)); + memset((void*)_entries, NullEntry, _num_entries * SparsePRTEntry::size()); + memset((void*)_buckets, NullEntry, _capacity * sizeof(int)); _free_list = NullEntry; _free_region = 0; } --- old/src/share/vm/interpreter/linkResolver.cpp 2017-07-02 11:30:42.000000000 +0200 +++ new/src/share/vm/interpreter/linkResolver.cpp 2017-07-02 11:30:42.000000000 +0200 @@ -224,6 +224,7 @@ case direct_call: kindstr = "direct"; break; case vtable_call: kindstr = "vtable"; break; case itable_call: kindstr = "itable"; break; + default: break; } tty->print_cr("Call %s@%d %s", kindstr, _call_index, _resolved_method.is_null() ? "(none)" : _resolved_method->name_and_sig_as_C_string()); --- old/src/share/vm/libadt/dict.cpp 2017-07-02 11:30:43.000000000 +0200 +++ new/src/share/vm/libadt/dict.cpp 2017-07-02 11:30:42.000000000 +0200 @@ -70,7 +70,7 @@ _size = 16; // Size is a power of 2 _cnt = 0; // Dictionary is empty _bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size); - memset(_bin,0,sizeof(bucket)*_size); + memset((void*)_bin,0,sizeof(bucket)*_size); } Dict::Dict(CmpKey initcmp, Hash inithash, Arena *arena, int size) @@ -91,7 +91,7 @@ _size = i; // Size is a power of 2 _cnt = 0; // Dictionary is empty _bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size); - memset(_bin,0,sizeof(bucket)*_size); + memset((void*)_bin,0,sizeof(bucket)*_size); } //------------------------------~Dict------------------------------------------ @@ -127,7 +127,7 @@ uint oldsize = _size; _size <<= 1; // Double in size _bin = (bucket*)_arena->Arealloc(_bin, sizeof(bucket) * oldsize, sizeof(bucket) * _size); - memset(&_bin[oldsize], 0, oldsize * sizeof(bucket)); + memset((void*)(&_bin[oldsize]), 0, oldsize * sizeof(bucket)); // Rehash things to spread into new table for (uint i = 0; i < oldsize; i++) { // For complete OLD table do bucket *b = &_bin[i]; // Handy shortcut for _bin[i] @@ -163,7 +163,7 @@ // Deep copy a dictionary. Dict::Dict( const Dict &d ) : _size(d._size), _cnt(d._cnt), _hash(d._hash),_cmp(d._cmp), _arena(d._arena) { _bin = (bucket*)_arena->Amalloc_4(sizeof(bucket)*_size); - memcpy( _bin, d._bin, sizeof(bucket)*_size ); + memcpy( (void*)_bin, (void*)d._bin, sizeof(bucket)*_size ); for( uint i=0; i<_size; i++ ) { if( !_bin[i]._keyvals ) continue; _bin[i]._keyvals=(void**)_arena->Amalloc_4( sizeof(void *)*_bin[i]._max*2); @@ -177,7 +177,7 @@ if( _size < d._size ) { // If must have more buckets _arena = d._arena; _bin = (bucket*)_arena->Arealloc( _bin, sizeof(bucket)*_size, sizeof(bucket)*d._size ); - memset( &_bin[_size], 0, (d._size-_size)*sizeof(bucket) ); + memset( (void*)(&_bin[_size]), 0, (d._size-_size)*sizeof(bucket) ); _size = d._size; } uint i; --- old/src/share/vm/memory/filemap.cpp 2017-07-02 11:30:43.000000000 +0200 +++ new/src/share/vm/memory/filemap.cpp 2017-07-02 11:30:43.000000000 +0200 @@ -150,7 +150,7 @@ FileMapInfo::FileMapInfo() { assert(_current_info == NULL, "must be singleton"); // not thread safe _current_info = this; - memset(this, 0, sizeof(FileMapInfo)); + memset((void*)this, 0, sizeof(FileMapInfo)); _file_offset = 0; _file_open = false; _header = SharedClassUtil::allocate_file_map_header(); --- old/src/share/vm/oops/instanceKlass.cpp 2017-07-02 11:30:43.000000000 +0200 +++ new/src/share/vm/oops/instanceKlass.cpp 2017-07-02 11:30:43.000000000 +0200 @@ -1078,7 +1078,7 @@ void InstanceKlass::call_class_initializer(TRAPS) { if (ReplayCompiles && (ReplaySuppressInitializers == 1 || - ReplaySuppressInitializers >= 2 && class_loader() != NULL)) { + (ReplaySuppressInitializers >= 2 && class_loader() != NULL))) { // Hide the existence of the initializer for the purpose of replaying the compile return; } --- old/src/share/vm/opto/gcm.cpp 2017-07-02 11:30:43.000000000 +0200 +++ new/src/share/vm/opto/gcm.cpp 2017-07-02 11:30:43.000000000 +0200 @@ -512,7 +512,7 @@ #ifdef ASSERT if (load_alias_idx == Compile::AliasIdxBot && C->AliasLevel() > 0 && (PrintOpto || VerifyAliases || - PrintMiscellaneous && (WizardMode || Verbose))) { + (PrintMiscellaneous && (WizardMode || Verbose)))) { // Load nodes should not consume all of memory. // Reporting a bottom type indicates a bug in adlc. // If some particular type of node validly consumes all of memory, --- old/src/share/vm/opto/graphKit.cpp 2017-07-02 11:30:44.000000000 +0200 +++ new/src/share/vm/opto/graphKit.cpp 2017-07-02 11:30:44.000000000 +0200 @@ -1108,6 +1108,7 @@ case Bytecodes::_aload_0: assert(inputs == 0 && outputs == 1, ""); break; case Bytecodes::_return: assert(inputs == 0 && outputs == 0, ""); break; case Bytecodes::_drem: assert(inputs == 4 && outputs == 2, ""); break; + default: break; } #endif //ASSERT --- old/src/share/vm/opto/ifg.cpp 2017-07-02 11:30:44.000000000 +0200 +++ new/src/share/vm/opto/ifg.cpp 2017-07-02 11:30:44.000000000 +0200 @@ -48,7 +48,7 @@ _adjs = (IndexSet*)_arena->Amalloc(sizeof(IndexSet)*maxlrg); // Also make empty live range structures _lrgs = (LRG *)_arena->Amalloc( maxlrg * sizeof(LRG) ); - memset(_lrgs,0,sizeof(LRG)*maxlrg); + memset((void*)_lrgs,0,sizeof(LRG)*maxlrg); // Init all to empty for( uint i = 0; i < maxlrg; i++ ) { _adjs[i].initialize(maxlrg); --- old/src/share/vm/opto/live.cpp 2017-07-02 11:30:44.000000000 +0200 +++ new/src/share/vm/opto/live.cpp 2017-07-02 11:30:44.000000000 +0200 @@ -347,18 +347,18 @@ } } } else if( check->bottom_type()->is_ptr()->_offset == 0 ) { - if(check->is_Proj() || check->is_Mach() && + if(check->is_Proj() || (check->is_Mach() && (check->as_Mach()->ideal_Opcode() == Op_CreateEx || check->as_Mach()->ideal_Opcode() == Op_ThreadLocal || check->as_Mach()->ideal_Opcode() == Op_CMoveP || check->as_Mach()->ideal_Opcode() == Op_CheckCastPP || #ifdef _LP64 - UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP || - UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN || - UseCompressedClassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass || + (UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP) || + (UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN) || + (UseCompressedClassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass) || #endif check->as_Mach()->ideal_Opcode() == Op_LoadP || - check->as_Mach()->ideal_Opcode() == Op_LoadKlass)) { + check->as_Mach()->ideal_Opcode() == Op_LoadKlass))) { // Valid nodes } else { check->dump(); --- old/src/share/vm/opto/loopTransform.cpp 2017-07-02 11:30:45.000000000 +0200 +++ new/src/share/vm/opto/loopTransform.cpp 2017-07-02 11:30:44.000000000 +0200 @@ -1413,7 +1413,7 @@ loop->dump_head(); } - if (C->do_vector_loop() && (PrintOpto && VerifyLoopOptimizations || TraceLoopOpts)) { + if (C->do_vector_loop() && (PrintOpto && (VerifyLoopOptimizations || TraceLoopOpts))) { Arena* arena = Thread::current()->resource_area(); Node_Stack stack(arena, C->live_nodes() >> 2); Node_List rpo_list; @@ -1652,7 +1652,7 @@ loop->record_for_igvn(); #ifndef PRODUCT - if (C->do_vector_loop() && (PrintOpto && VerifyLoopOptimizations || TraceLoopOpts)) { + if (C->do_vector_loop() && (PrintOpto && (VerifyLoopOptimizations || TraceLoopOpts))) { tty->print("\nnew loop after unroll\n"); loop->dump_head(); for (uint i = 0; i < loop->_body.size(); i++) { loop->_body.at(i)->dump(); --- old/src/share/vm/opto/matcher.cpp 2017-07-02 11:30:45.000000000 +0200 +++ new/src/share/vm/opto/matcher.cpp 2017-07-02 11:30:45.000000000 +0200 @@ -1679,14 +1679,14 @@ } const Type* mach_at = mach->adr_type(); // DecodeN node consumed by an address may have different type - // then its input. Don't compare types for such case. + // than its input. Don't compare types for such case. if (m->adr_type() != mach_at && (m->in(MemNode::Address)->is_DecodeNarrowPtr() || - m->in(MemNode::Address)->is_AddP() && - m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr() || - m->in(MemNode::Address)->is_AddP() && - m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() && - m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr())) { + (m->in(MemNode::Address)->is_AddP() && + m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()) || + (m->in(MemNode::Address)->is_AddP() && + m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() && + m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr()))) { mach_at = m->adr_type(); } if (m->adr_type() != mach_at) { --- old/src/share/vm/opto/mulnode.cpp 2017-07-02 11:30:45.000000000 +0200 +++ new/src/share/vm/opto/mulnode.cpp 2017-07-02 11:30:45.000000000 +0200 @@ -88,9 +88,9 @@ // Check for dead loop int op1 = mul1->Opcode(); if( phase->eqv( mul1, this ) || phase->eqv( in(2), this ) || - ( op1 == mul_opcode() || op1 == add_opcode() ) && - ( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) || - phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) ) + ( ( op1 == mul_opcode() || op1 == add_opcode() ) && + ( phase->eqv( mul1->in(1), this ) || phase->eqv( mul1->in(2), this ) || + phase->eqv( mul1->in(1), mul1 ) || phase->eqv( mul1->in(2), mul1 ) ) ) ) assert(false, "dead loop in MulNode::Ideal"); #endif --- old/src/share/vm/opto/phaseX.cpp 2017-07-02 11:30:45.000000000 +0200 +++ new/src/share/vm/opto/phaseX.cpp 2017-07-02 11:30:45.000000000 +0200 @@ -395,7 +395,7 @@ // Unlock all nodes upon replacement of table. if (&nh == this) return; if (_table != (Node**)badAddress) clear(); - memcpy(this, &nh, sizeof(*this)); + memcpy((void*)this, (void*)&nh, sizeof(*this)); // Do not increment hash_lock counts again. // Instead, be sure we never again use the source table. ((NodeHash*)&nh)->_table = (Node**)badAddress; @@ -1676,6 +1676,8 @@ case Type::Long: assert(t0->isa_long()->_widen <= t->isa_long()->_widen, "widen increases"); break; + default: + break; } return true; } --- old/src/share/vm/opto/subnode.cpp 2017-07-02 11:30:46.000000000 +0200 +++ new/src/share/vm/opto/subnode.cpp 2017-07-02 11:30:46.000000000 +0200 @@ -147,9 +147,9 @@ #ifdef ASSERT // Check for dead loop if( phase->eqv( in1, this ) || phase->eqv( in2, this ) || - ( op1 == Op_AddI || op1 == Op_SubI ) && - ( phase->eqv( in1->in(1), this ) || phase->eqv( in1->in(2), this ) || - phase->eqv( in1->in(1), in1 ) || phase->eqv( in1->in(2), in1 ) ) ) + ( ( op1 == Op_AddI || op1 == Op_SubI ) && + ( phase->eqv( in1->in(1), this ) || phase->eqv( in1->in(2), this ) || + phase->eqv( in1->in(1), in1 ) || phase->eqv( in1->in(2), in1 ) ) ) ) assert(false, "dead loop in SubINode::Ideal"); #endif @@ -277,9 +277,9 @@ #ifdef ASSERT // Check for dead loop if( phase->eqv( in1, this ) || phase->eqv( in2, this ) || - ( op1 == Op_AddL || op1 == Op_SubL ) && - ( phase->eqv( in1->in(1), this ) || phase->eqv( in1->in(2), this ) || - phase->eqv( in1->in(1), in1 ) || phase->eqv( in1->in(2), in1 ) ) ) + ( ( op1 == Op_AddL || op1 == Op_SubL ) && + ( phase->eqv( in1->in(1), this ) || phase->eqv( in1->in(2), this ) || + phase->eqv( in1->in(1), in1 ) || phase->eqv( in1->in(2), in1 ) ) ) ) assert(false, "dead loop in SubLNode::Ideal"); #endif --- old/src/share/vm/opto/type.cpp 2017-07-02 11:30:46.000000000 +0200 +++ new/src/share/vm/opto/type.cpp 2017-07-02 11:30:46.000000000 +0200 @@ -3968,6 +3968,8 @@ st->print(":%s", ptr_msg[_ptr]); if( _klass_is_exact ) st->print(":exact"); break; + default: + break; } if( _offset ) { // Dump offset, if any @@ -4437,6 +4439,8 @@ st->print(":%s", ptr_msg[_ptr]); if( _klass_is_exact ) st->print(":exact"); break; + default: + break; } if( _offset != 0 ) { @@ -5202,6 +5206,8 @@ st->print(":%s", ptr_msg[_ptr]); if( _klass_is_exact ) st->print(":exact"); break; + default: + break; } if( _offset ) { // Dump offset, if any --- old/src/share/vm/prims/unsafe.cpp 2017-07-02 11:30:46.000000000 +0200 +++ new/src/share/vm/prims/unsafe.cpp 2017-07-02 11:30:46.000000000 +0200 @@ -111,7 +111,7 @@ "raw [ptr+disp] must be consistent with oop::field_base"); } jlong p_size = HeapWordSize * (jlong)(p->size()); - assert(byte_offset < p_size, "Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, byte_offset, p_size); + assert(byte_offset < p_size, "Unsafe access: offset " INT64_FORMAT " > object's size " INT64_FORMAT, (int64_t)byte_offset, (int64_t)p_size); } #endif --- old/src/share/vm/runtime/safepoint.cpp 2017-07-02 11:30:47.000000000 +0200 +++ new/src/share/vm/runtime/safepoint.cpp 2017-07-02 11:30:46.000000000 +0200 @@ -363,8 +363,8 @@ if (safepoint_limit_time < current_time) { tty->print_cr("# SafepointSynchronize: Finished after " INT64_FORMAT_W(6) " ms", - ((current_time - safepoint_limit_time) / MICROUNITS + - (jlong)SafepointTimeoutDelay)); + (int64_t)((current_time - safepoint_limit_time) / MICROUNITS + + (jlong)SafepointTimeoutDelay)); } } #endif --- old/src/share/vm/runtime/stackValueCollection.cpp 2017-07-02 11:30:47.000000000 +0200 +++ new/src/share/vm/runtime/stackValueCollection.cpp 2017-07-02 11:30:47.000000000 +0200 @@ -138,10 +138,10 @@ if( at(index )->type() == T_INT && index+1 < size() && at(index+1)->type() == T_INT ) { - tty->print(" " INT64_FORMAT " (long)", long_at(index)); + tty->print(" " INT64_FORMAT " (long)", (int64_t)long_at(index)); tty->cr(); tty->print("\t %.15e (double)", double_at(index)); - tty->print(" " PTR64_FORMAT " (longhex)", long_at(index)); + tty->print(" " PTR64_FORMAT " (longhex)", (int64_t)long_at(index)); } tty->cr(); } --- old/src/share/vm/utilities/hashtable.cpp 2017-07-02 11:30:47.000000000 +0200 +++ new/src/share/vm/utilities/hashtable.cpp 2017-07-02 11:30:47.000000000 +0200 @@ -205,7 +205,7 @@ if (*top + entry_size() > end) { report_out_of_shared_space(SharedMiscData); } - *p = (BasicHashtableEntry*)memcpy(*top, *p, entry_size()); + *p = (BasicHashtableEntry*)memcpy(*top, (void*)*p, entry_size()); *top += entry_size(); } } @@ -285,7 +285,7 @@ if (*top + len > end) { report_out_of_shared_space(SharedMiscData); } - _buckets = (HashtableBucket*)memcpy(*top, _buckets, len); + _buckets = (HashtableBucket*)memcpy(*top, (void*)_buckets, len); *top += len; }