FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

deps: suppress zlib compiler warnings by danbev · Pull Request #40343 · nodejs/node · GitHub

/ node Public

deps: suppress zlib compiler warnings - #40343

Closed
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:zlib-warnings
Closed

deps: suppress zlib compiler warnings#40343
danbev wants to merge 2 commits into
nodejs:masterfrom
danbev:zlib-warnings

Conversation

danbev commented Oct 6, 2021

Copy link
Copy Markdown
Contributor

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.

nodejs-github-bot added needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib subsystem. labels Oct 6, 2021

Copy link
Copy Markdown
Collaborator

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.
Move cflags into conditions section and only enable for non-windows
architectures.

Copy link
Copy Markdown
Collaborator

danbev commented Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

Re-run of failing /node-test-binary-windows-js-suites ✔️

danbev added a commit that referenced this pull request Oct 11, 2021
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: #40343
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

danbev commented Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

Landed in 5d7bd86.

danbev closed this Oct 11, 2021
targos pushed a commit that referenced this pull request Oct 13, 2021
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: #40343
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau mentioned this pull request Oct 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL