Skip to content

Commit

Permalink
deps: suppress zlib compiler warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danbev committed Oct 6, 2021
1 parent 87da53c commit 99ae7e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deps/zlib/zlib.gyp
Expand Up @@ -51,6 +51,7 @@
'.',
],
},
'cflags': [ '-Wno-implicit-fallthrough' ],
'conditions': [
['OS!="win"', {
'cflags!': [ '-ansi' ],
Expand Down

0 comments on commit 99ae7e5

Please sign in to comment.