From 5d7bd8616e6f50ef9d71585a3d66ecb324d8acaa Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 6 Oct 2021 09:06:36 +0200 Subject: [PATCH] deps: suppress zlib compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, there are a number of compilation warnings from zlib like the following one: ../deps/zlib/infback.c: In function ‘inflateBack’: ../deps/zlib/infback.c:479:25: warning: this statement may fall through [-Wimplicit-fallthrough=] 479 | state->mode = LEN; | ~~~~~~~~~~~~^~~~~ ../deps/zlib/infback.c:481:9: note: here 481 | case LEN: | ^~~~ In this case there is no break statement and the intention is to fall through: Tracev((stderr, "inflate: codes ok\n")); state->mode = LEN; case LEN: This commit adds -Wno-implicit-fallthrough' to zlib.gyp to suppress these warnings. PR-URL: https://github.com/nodejs/node/pull/40343 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: James M Snell --- deps/zlib/zlib.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/zlib/zlib.gyp b/deps/zlib/zlib.gyp index bbfb561b89b52f..7cc472d63ad056 100644 --- a/deps/zlib/zlib.gyp +++ b/deps/zlib/zlib.gyp @@ -54,6 +54,7 @@ 'conditions': [ ['OS!="win"', { 'cflags!': [ '-ansi' ], + 'cflags': [ '-Wno-implicit-fallthrough' ], 'defines': [ 'HAVE_HIDDEN' ], }], ['OS=="mac" or OS=="ios" or OS=="freebsd" or OS=="android"', {