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

test: fix warning in n-api reference test #12730

Closed
wants to merge 2 commits into from

Conversation

Projects
None yet
6 participants
@mhdawson
Copy link
Member

commented Apr 28, 2017

Add cast to avoid warning during build of addon.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test, n-api

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.
@@ -61,7 +61,7 @@ napi_value CheckExternal(napi_env env, napi_callback_info info) {
NAPI_ASSERT(env, argtype == napi_external, "Expected an external value.")

int* data;
NAPI_CALL(env, napi_get_value_external(env, arg, &data));
NAPI_CALL(env, napi_get_value_external(env, arg, (void*)&data));

This comment has been minimized.

Copy link
@addaleax

addaleax Apr 30, 2017

Member

This should be void**, not void*. Alternatively, you could also lose the pointer-to-pointer cast and do it the safe way:

void* data;
napi_get_value_external(env, arg, &data);
data != NULL && *(int*)data == test_value
@mhdawson

This comment has been minimized.

Copy link
Member Author

commented May 1, 2017

@addaleax pushed commit to fix.

@addaleax

This comment has been minimized.

Copy link
Member

commented May 3, 2017

Landed in 8aca66a

@addaleax addaleax closed this May 3, 2017

addaleax added a commit that referenced this pull request May 3, 2017

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

PR-URL: #12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

anchnk added a commit to anchnk/node that referenced this pull request May 6, 2017

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

PR-URL: nodejs#12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

@jasnell jasnell referenced this pull request May 11, 2017

Closed

8.0.0 Release Proposal #12220

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete

@mhdawson mhdawson deleted the mhdawson:fix-napi-warnings branch Jun 28, 2017

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 12, 2018

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

PR-URL: nodejs#12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 31, 2018

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

PR-URL: nodejs#12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Apr 10, 2018

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

PR-URL: nodejs#12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

MylesBorins added a commit that referenced this pull request Apr 16, 2018

test: fix warning in n-api reference test
Add cast to avoid warning during build of addon.

Backport-PR-URL: #19447
PR-URL: #12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

@MylesBorins MylesBorins referenced this pull request Apr 16, 2018

Merged

v6.14.2 proposal #19996

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.