diff --git a/make/modules/java.base/lib/CoreLibraries.gmk b/make/modules/java.base/lib/CoreLibraries.gmk index 87a4460a972..0c3eff7c158 100644 --- a/make/modules/java.base/lib/CoreLibraries.gmk +++ b/make/modules/java.base/lib/CoreLibraries.gmk @@ -108,12 +108,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \ OPTIMIZATION := LOW, \ EXTRA_HEADER_DIRS := libjava, \ CFLAGS_unix := -UDEBUG, \ - DISABLED_WARNINGS_gcc_imageDecompressor.cpp := unused-variable, \ - DISABLED_WARNINGS_gcc_imageFile.cpp := unused-const-variable \ - unused-variable, \ - DISABLED_WARNINGS_clang_imageDecompressor.cpp := unused-variable, \ - DISABLED_WARNINGS_clang_imageFile.cpp := unused-private-field \ - unused-variable, \ LDFLAGS := $(LDFLAGS_CXX_JDK), \ JDK_LIBS := libjvm, \ LIBS_unix := $(LIBDL), \ diff --git a/src/java.base/share/native/libjimage/imageDecompressor.cpp b/src/java.base/share/native/libjimage/imageDecompressor.cpp index 4946e645c55..e2bc27440e6 100644 --- a/src/java.base/share/native/libjimage/imageDecompressor.cpp +++ b/src/java.base/share/native/libjimage/imageDecompressor.cpp @@ -43,15 +43,6 @@ typedef jboolean (*ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg); static ZipInflateFully_t ZipInflateFully = NULL; -#ifndef WIN32 - #define JNI_LIB_PREFIX "lib" - #ifdef __APPLE__ - #define JNI_LIB_SUFFIX ".dylib" - #else - #define JNI_LIB_SUFFIX ".so" - #endif -#endif - /** * Return the address of the entry point named in the zip shared library. * @param name - the name of the entry point @@ -179,7 +170,7 @@ void ImageDecompressor::decompress_resource(u1* compressed, u1* uncompressed, void ZipDecompressor::decompress_resource(u1* data, u1* uncompressed, ResourceHeader* header, const ImageStrings* strings) { char* msg = NULL; - jboolean res = ZipDecompressor::decompress(data, header->_size, uncompressed, + [[maybe_unused]] jboolean res = ZipDecompressor::decompress(data, header->_size, uncompressed, header->_uncompressed_size, &msg); assert(res && "decompression failed"); } diff --git a/src/java.base/share/native/libjimage/imageFile.cpp b/src/java.base/share/native/libjimage/imageFile.cpp index b5e65da59bc..f8d6079c2a2 100644 --- a/src/java.base/share/native/libjimage/imageFile.cpp +++ b/src/java.base/share/native/libjimage/imageFile.cpp @@ -43,12 +43,6 @@ // Map the full jimage, only with 64 bit addressing. bool ImageFileReader::memory_map_image = sizeof(void *) == 8; -#ifdef WIN32 -const char FileSeparator = '\\'; -#else -const char FileSeparator = '/'; -#endif - // Image files are an alternate file format for storing classes and resources. The // goal is to supply file access which is faster and smaller than the jar format. // @@ -428,7 +422,7 @@ void ImageFileReader::get_resource(ImageLocation& location, u1* uncompressed_dat compressed_data = new u1[(size_t)compressed_size]; assert(compressed_data != NULL && "allocation failed"); // Read bytes from offset beyond the image index. - bool is_read = read_at(compressed_data, compressed_size, _index_size + offset); + [[maybe_unused]] bool is_read = read_at(compressed_data, compressed_size, _index_size + offset); assert(is_read && "error reading from image or short read"); } else { compressed_data = get_data_address() + offset; @@ -444,7 +438,7 @@ void ImageFileReader::get_resource(ImageLocation& location, u1* uncompressed_dat } } else { // Read bytes from offset beyond the image index. - bool is_read = read_at(uncompressed_data, uncompressed_size, _index_size + offset); + [[maybe_unused]] bool is_read = read_at(uncompressed_data, uncompressed_size, _index_size + offset); assert(is_read && "error reading from image or short read"); } }