Skip to content

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

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;
caseLEN:

This commit adds -Wno-implicit-fallthrough to zlib.gyp to suppress
these warnings.

@nodejs-github-botnodejs-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
@nodejs-github-bot

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.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@danbev

Copy link
Copy Markdown
ContributorAuthor

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

Copy link
Copy Markdown
ContributorAuthor

Landed in 5d7bd86.

@danbevdanbev 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>
@BethGriggsBethGriggs mentioned this pull request Oct 14, 2021
2 tasks
@richardlaurichardlau mentioned this pull request Oct 18, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@danbev@nodejs-github-bot@jasnell@lpinca@richardlau