JDK-8389455

This commit is contained in:
MBaesken 2026-07-30 15:51:43 +02:00
parent d78a34e0a1
commit 17c8bfeab8
3 changed files with 3 additions and 24 deletions

View File

@ -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), \

View File

@ -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");
}

View File

@ -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");
}
}