diff --git a/make/launcher/Launcher-jdk.pack.gmk b/make/launcher/Launcher-jdk.pack.gmk index 1f95b64cfa7..c7138f2ee99 100644 --- a/make/launcher/Launcher-jdk.pack.gmk +++ b/make/launcher/Launcher-jdk.pack.gmk @@ -90,6 +90,7 @@ $(eval $(call SetupJdkExecutable, BUILD_UNPACKEXE, \ CFLAGS_linux := -fPIC, \ CFLAGS_solaris := -KPIC, \ CFLAGS_macosx := -fPIC, \ + DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \ LDFLAGS := $(UNPACKEXE_ZIPOBJS) \ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/src/jdk.pack/share/native/common-unpack/unpack.cpp b/src/jdk.pack/share/native/common-unpack/unpack.cpp index 3883efb4dea..8f7a09d1243 100644 --- a/src/jdk.pack/share/native/common-unpack/unpack.cpp +++ b/src/jdk.pack/share/native/common-unpack/unpack.cpp @@ -1799,7 +1799,6 @@ unpacker::attr_definitions::parseLayout(const char* lp, band** &res, case 'B': case 'H': case 'I': case 'V': // unsigned_int case 'S': // signed_int --lp; // reparse - /* fall through */ case 'F': lp = parseIntLayout(lp, b, EK_INT); break; diff --git a/src/jdk.pack/share/native/common-unpack/zip.cpp b/src/jdk.pack/share/native/common-unpack/zip.cpp index 2003427a9de..f64740e91e3 100644 --- a/src/jdk.pack/share/native/common-unpack/zip.cpp +++ b/src/jdk.pack/share/native/common-unpack/zip.cpp @@ -533,8 +533,6 @@ static jlong read_input_via_gzip(unpacker* u, char* bufptr = (char*) buf; char* inbuf = u->gzin->inbuf; size_t inbuflen = sizeof(u->gzin->inbuf); - // capture return values from fread to avoid -Werror=unused-result issues - size_t ret = 0; unpacker::read_input_fn_t read_gzin_fn = (unpacker::read_input_fn_t) u->gzin->read_input_fn; z_stream& zs = *(z_stream*) u->gzin->zstream; @@ -581,8 +579,8 @@ static jlong read_input_via_gzip(unpacker* u, fseek(u->infileptr, -TRAILER_LEN, SEEK_END); uint filecrc; uint filelen; - ret = fread(&filecrc, sizeof(filecrc), 1, u->infileptr); - ret = fread(&filelen, sizeof(filelen), 1, u->infileptr); + fread(&filecrc, sizeof(filecrc), 1, u->infileptr); + fread(&filelen, sizeof(filelen), 1, u->infileptr); filecrc = SWAP_INT(filecrc); filelen = SWAP_INT(filelen); if (u->gzin->gzcrc != filecrc ||