From da7fb6cbfaecdabd7630acbdc0d74a68c310fcd9 Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Wed, 18 Dec 2024 10:05:19 -0600 Subject: [PATCH] Cherry pick 51be7db from jdk21u history. 8211804: Constant AO_UNUSED_MBZ uses left shift of negative value Use unsigned shift. --- jdk/src/share/native/com/sun/java/util/jar/pack/constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h index f1a1f73edff..b032469f318 100644 --- a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h +++ b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h @@ -223,7 +223,7 @@ enum { AO_HAVE_FIELD_FLAGS_HI = 1<<10, AO_HAVE_METHOD_FLAGS_HI = 1<<11, AO_HAVE_CODE_FLAGS_HI = 1<<12, - AO_UNUSED_MBZ = (-1)<<13, // options bits reserved for future use. + AO_UNUSED_MBZ = (int)((~0U) << 13), // options bits reserved for future use. #define ARCHIVE_BIT_DO(F) \ F(AO_HAVE_SPECIAL_FORMATS) \