Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: silence warnings from dependencies #31311

Closed
wants to merge 2 commits into from

Conversation

richardlau
Copy link
Member

Silence compiler warnings on Windows from our dependencies that are being
shown as Unchanged files with check annotations by GitHub in the
Files changed tab on pull requests since we started building via GitHub Actions
in #31153.

e.g.
image

(I've separately upstreamed a fix for the uvwasi warning: nodejs/uvwasi#72.)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Silence the following compiler warning on Windows:
`inet_addr': Use inet_pton() or InetPton() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings`
Silence the following compiler warning on Windows:
`'function': different 'const' qualifiers`
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. labels Jan 11, 2020
@@ -32,6 +32,7 @@
'cflags': [
'-W3', '-wd4090', '-Gs0', '-GF', '-Gy', '-nologo','/O2',
],
'msvs_disabled_warnings': [4090],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell (setting the msbuild_args=/clp:Verbosity=n environment variable before calling vcbuild to get verbose command lines being passed to cl.exe) the above cflags (containing -wd4090 which should suppress the warning) is being ignored. I've left the cflags alone for now as I can't be sure it isn't used in non-msvs scenarios on Windows (Ninja?).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, OpenSSL's own build configuration ignores the same warning:

# Note about /wd4090, disable warning C4090. This warning returns false
# positives in some situations. Disabling it altogether masks both
# legitimate and false cases, but as we compile on multiple platforms,
# we rely on other compilers to catch legitimate cases.

@richardlau richardlau added openssl Issues and PRs related to the OpenSSL dependency. windows Issues and PRs related to the Windows platform. labels Jan 11, 2020
@richardlau richardlau changed the title Warnings build: fix warnings from dependencies Jan 11, 2020
@richardlau richardlau changed the title build: fix warnings from dependencies build: silence warnings from dependencies Jan 11, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 11, 2020
@BridgeAR
Copy link
Member

Landed in 560df95, c643e3b 🎉

@BridgeAR BridgeAR closed this Jan 13, 2020
BridgeAR pushed a commit that referenced this pull request Jan 13, 2020
Silence the following compiler warning on Windows:
`inet_addr': Use inet_pton() or InetPton() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BridgeAR pushed a commit that referenced this pull request Jan 13, 2020
Silence the following compiler warning on Windows:
`'function': different 'const' qualifiers`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@richardlau richardlau deleted the warnings branch January 13, 2020 10:43
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
Silence the following compiler warning on Windows:
`inet_addr': Use inet_pton() or InetPton() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
Silence the following compiler warning on Windows:
`'function': different 'const' qualifiers`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Jan 16, 2020
codebytere pushed a commit that referenced this pull request Mar 14, 2020
Silence the following compiler warning on Windows:
`inet_addr': Use inet_pton() or InetPton() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 14, 2020
Silence the following compiler warning on Windows:
`'function': different 'const' qualifiers`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Silence the following compiler warning on Windows:
`inet_addr': Use inet_pton() or InetPton() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Silence the following compiler warning on Windows:
`'function': different 'const' qualifiers`

PR-URL: #31311
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. openssl Issues and PRs related to the OpenSSL dependency. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants