--- old/src/java.desktop/share/native/libjavajpeg/jcmaster.c 2015-05-27 18:01:05.501206768 +0900 +++ new/src/java.desktop/share/native/libjavajpeg/jcmaster.c 2015-05-27 18:01:05.386209535 +0900 @@ -235,7 +235,11 @@ ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); /* Make sure components are not sent twice */ for (ci = 0; ci < ncomps; ci++) { +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif thisi = scanptr->component_index[ci]; + if (component_sent[thisi]) ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); component_sent[thisi] = TRUE; --- old/src/java.desktop/share/native/libjavajpeg/jquant1.c 2015-05-27 18:01:05.878197700 +0900 +++ new/src/java.desktop/share/native/libjavajpeg/jquant1.c 2015-05-27 18:01:05.766200394 +0900 @@ -439,6 +439,10 @@ ODITHER_MATRIX_PTR odither; int i, j, nci; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif for (i = 0; i < cinfo->out_color_components; i++) { nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ odither = NULL; /* search for matching prior component */ @@ -452,6 +456,9 @@ odither = make_odither_array(cinfo, nci); cquantize->odither[i] = odither; } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } --- old/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_64.c 2015-05-27 18:01:06.266188367 +0900 +++ new/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_64.c 2015-05-27 18:01:06.153191085 +0900 @@ -524,7 +524,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -544,7 +551,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_d64, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -565,7 +579,14 @@ table_base[c] = &table[c][shift]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_d64, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ --- old/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp_f.c 2015-05-27 18:01:06.649179154 +0900 +++ new/src/java.desktop/share/native/libmlib_image/mlib_c_ImageLookUp_f.c 2015-05-27 18:01:06.536181872 +0900 @@ -739,7 +739,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -759,7 +766,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u8, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -779,7 +793,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u8, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1345,7 +1366,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1365,7 +1393,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s16, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1385,7 +1420,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s16, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1405,7 +1447,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1425,7 +1474,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u16, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1445,7 +1501,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_u16, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1785,7 +1848,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1805,7 +1875,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s32, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -1825,7 +1902,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUP(mlib_s32, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -2835,7 +2919,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_u8, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3292,7 +3383,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3332,7 +3430,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_s16, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3372,7 +3477,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3392,7 +3504,14 @@ table_base[c] = &table[c][TABLE_SHIFT_S32]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_u16, mlib_s32, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3832,7 +3951,14 @@ table_base[c] = &table[c][32768]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_s16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ @@ -3852,7 +3978,14 @@ table_base[c] = &table[c][0]; } +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif MLIB_C_IMAGELOOKUPSI(mlib_s32, mlib_u16, table_base); +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } /***************************************************************/ --- old/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c 2015-05-27 18:01:07.102168257 +0900 +++ new/src/java.desktop/share/native/libsplashscreen/splashscreen_png.c 2015-05-27 18:01:06.988170999 +0900 @@ -48,9 +48,18 @@ int stride; ImageFormat srcFormat; png_uint_32 i, rowbytes; + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclobbered" +#endif png_bytepp row_pointers = NULL; png_bytep image_data = NULL; int success = 0; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + double gamma; png_structp png_ptr = NULL; @@ -173,8 +182,14 @@ success = 1; done: - free(row_pointers); - free(image_data); + if (row_pointers != NULL) { + free(row_pointers); + row_pointers = NULL; + } + if (image_data != NULL) { + free(image_data); + image_data = NULL; + } png_destroy_read_struct(&png_ptr, &info_ptr, NULL); return success; } --- old/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c 2015-05-27 18:01:07.477159236 +0900 +++ new/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c 2015-05-27 18:01:07.363161979 +0900 @@ -518,8 +518,8 @@ case JDWP_REQUEST_MODIFIER(SourceNameMatch): { char* desiredNamePattern = filter->u.SourceNameOnly.sourceNamePattern; - if (!searchAllSourceNames(env, clazz, - desiredNamePattern) == 1) { + if (searchAllSourceNames(env, clazz, + desiredNamePattern) != 1) { /* The name isn't in the SDE; try the sourceName in the ref * type */