mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-05 21:50:20 +00:00
8074827: Resolve disabled warnings for libjavajpeg
Reviewed-by: serb, psadhukhan
This commit is contained in:
parent
6632e6c6ca
commit
a8ce73f840
@ -498,9 +498,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
|
||||
DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds shift-negative-value, \
|
||||
DISABLED_WARNINGS_clang := logical-op-parentheses, \
|
||||
DISABLED_WARNINGS_microsoft := 4267, \
|
||||
DISABLED_WARNINGS_gcc := clobbered, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
|
||||
@ -952,7 +952,7 @@ imageio_fill_input_buffer(j_decompress_ptr cinfo)
|
||||
sb->hstreamBuffer, 0,
|
||||
sb->bufferLength);
|
||||
if ((ret > 0) && ((unsigned int)ret > sb->bufferLength)) {
|
||||
ret = sb->bufferLength;
|
||||
ret = (int)sb->bufferLength;
|
||||
}
|
||||
if ((*env)->ExceptionOccurred(env)
|
||||
|| !GET_ARRAYS(env, data, &(src->next_input_byte))) {
|
||||
@ -1050,7 +1050,7 @@ imageio_fill_suspended_buffer(j_decompress_ptr cinfo)
|
||||
JPEGImageReader_readInputDataID,
|
||||
sb->hstreamBuffer,
|
||||
offset, buflen);
|
||||
if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen;
|
||||
if ((ret > 0) && ((unsigned int)ret > buflen)) ret = (int)buflen;
|
||||
if ((*env)->ExceptionOccurred(env)
|
||||
|| !GET_ARRAYS(env, data, &(src->next_input_byte))) {
|
||||
cinfo->err->error_exit((j_common_ptr) cinfo);
|
||||
@ -1774,8 +1774,8 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader
|
||||
v_samp1 = cinfo->comp_info[1].v_samp_factor;
|
||||
v_samp2 = cinfo->comp_info[2].v_samp_factor;
|
||||
|
||||
if ((h_samp1 > h_samp0) && (h_samp2 > h_samp0) ||
|
||||
(v_samp1 > v_samp0) && (v_samp2 > v_samp0))
|
||||
if (((h_samp1 > h_samp0) && (h_samp2 > h_samp0)) ||
|
||||
((v_samp1 > v_samp0) && (v_samp2 > v_samp0)))
|
||||
{
|
||||
cinfo->jpeg_color_space = JCS_YCCK;
|
||||
/* Leave the output space as CMYK */
|
||||
@ -1866,7 +1866,6 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
|
||||
pixelBufferPtr pb;
|
||||
sun_jpeg_error_ptr jerr;
|
||||
boolean done;
|
||||
boolean mustScale = FALSE;
|
||||
boolean progressive = FALSE;
|
||||
boolean orderedBands = TRUE;
|
||||
imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr);
|
||||
|
||||
@ -358,7 +358,7 @@ sun_jpeg_fill_suspended_buffer(j_decompress_ptr cinfo)
|
||||
}
|
||||
ret = (*env)->CallIntMethod(env, src->hInputStream, InputStream_readID,
|
||||
src->hInputBuffer, offset, buflen);
|
||||
if ((ret > 0) && ((unsigned int)ret > buflen)) ret = buflen;
|
||||
if ((ret > 0) && ((unsigned int)ret > buflen)) ret = (int)buflen;
|
||||
if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) {
|
||||
cinfo->err->error_exit((struct jpeg_common_struct *) cinfo);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user