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

node-api: fix compiler warning in node_api.h #49103

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Aug 11, 2023

Fix -Wstrict-prototypes warning from AppleClang 14.0.3.14030022, compiling C.

My team tests our C addon with -Werror and recent changes to node_api.h broke our build.

/Users/runner/.cmake-js/node-arm64/v18.17.0/include/node/node_api.h:33:65: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)();
                                                                ^
                                                                 void
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)();
                                                                ^
                                                                 void

The break started when the build machines started using node v18.17.0. Builds from a week ago, using node v18.16.1 were successful.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/node-api

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API. labels Aug 11, 2023
Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson mhdawson added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 14, 2023
@nodejs-github-bot
Copy link
Collaborator

Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.
Copy link
Contributor

@gabrielschulhof gabrielschulhof left a comment

Choose a reason for hiding this comment

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

LGTM

@graebm
Copy link
Contributor Author

graebm commented Aug 18, 2023

Seems like some tests are being flaky. Should I push an empty commit and force tests to re-run? Or wait for someone else to take care of things?

Copy link
Member

@legendecas legendecas left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 30, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 30, 2023
@nodejs-github-bot nodejs-github-bot merged commit 9848352 into nodejs:main Aug 30, 2023
27 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 9848352

@graebm graebm deleted the fix-strict-prototypes branch August 30, 2023 15:13
UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.

PR-URL: #49103
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Sep 10, 2023
toyobayashi added a commit to toyobayashi/emnapi that referenced this pull request Sep 14, 2023
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.

PR-URL: nodejs#49103
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
targos pushed a commit that referenced this pull request Nov 27, 2023
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.

PR-URL: #49103
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.

PR-URL: nodejs/node#49103
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Fix "-Wstrict-prototypes" warning from AppleClang 14.0.3.14030022,
compiling C, targeting arch arm64 (on x86_64 host). I build my C
addon with -Werror and recent changes to node_api.h broke our build.

PR-URL: nodejs/node#49103
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gabriel Schulhof <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants