From f677793d02a7aa5d01c06023000762b12b8cee91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= Date: Wed, 19 Jul 2023 07:49:52 +0000 Subject: [PATCH] 8312190: Fix c++11-narrowing warnings in hotspot code Reviewed-by: dholmes, kbarrett --- src/hotspot/share/classfile/verificationType.hpp | 6 +++--- src/hotspot/share/utilities/debug.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/classfile/verificationType.hpp b/src/hotspot/share/classfile/verificationType.hpp index 80eb1ca9036..5d674e19037 100644 --- a/src/hotspot/share/classfile/verificationType.hpp +++ b/src/hotspot/share/classfile/verificationType.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2023, 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 @@ -31,7 +31,7 @@ #include "runtime/handles.hpp" #include "runtime/signature.hpp" -enum { +enum : uint { // As specified in the JVM spec ITEM_Top = 0, ITEM_Integer = 1, @@ -67,7 +67,7 @@ class VerificationType { }; // Enum for the _data field - enum { + enum : uint { // Bottom two bits determine if the type is a reference, primitive, // uninitialized or a query-type. TypeMask = 0x00000003, diff --git a/src/hotspot/share/utilities/debug.hpp b/src/hotspot/share/utilities/debug.hpp index baa3013c059..93af7bdd0fa 100644 --- a/src/hotspot/share/utilities/debug.hpp +++ b/src/hotspot/share/utilities/debug.hpp @@ -245,7 +245,7 @@ do { // types of VM error - originally in vmError.hpp -enum VMErrorType { +enum VMErrorType : unsigned int { INTERNAL_ERROR = 0xe0000000, OOM_MALLOC_ERROR = 0xe0000001, OOM_MMAP_ERROR = 0xe0000002,