--- old/src/share/vm/gc/g1/heapRegionType.cpp 2017-06-28 15:43:56.000000000 -0700 +++ new/src/share/vm/gc/g1/heapRegionType.cpp 2017-06-28 15:43:56.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, 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 @@ -36,8 +36,9 @@ case OldTag: case ArchiveTag: return true; + default: + return false; } - return false; } const char* HeapRegionType::get_str() const { @@ -50,10 +51,10 @@ case ContinuesHumongousTag: return "HUMC"; case OldTag: return "OLD"; case ArchiveTag: return "ARC"; + default: ShouldNotReachHere(); + // keep some compilers happy + return NULL; } - ShouldNotReachHere(); - // keep some compilers happy - return NULL; } const char* HeapRegionType::get_short_str() const { @@ -66,10 +67,10 @@ case ContinuesHumongousTag: return "HC"; case OldTag: return "O"; case ArchiveTag: return "A"; + default: ShouldNotReachHere(); + // keep some compilers happy + return NULL; } - ShouldNotReachHere(); - // keep some compilers happy - return NULL; } G1HeapRegionTraceType::Type HeapRegionType::get_trace_type() { @@ -82,8 +83,8 @@ case ContinuesHumongousTag: return G1HeapRegionTraceType::ContinuesHumongous; case OldTag: return G1HeapRegionTraceType::Old; case ArchiveTag: return G1HeapRegionTraceType::Archive; + default: ShouldNotReachHere(); + // keep some compilers happy + return G1HeapRegionTraceType::Free; } - ShouldNotReachHere(); - // keep some compilers happy - return G1HeapRegionTraceType::Free; }