Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 705d9ec

Browse filesBrowse files
danbevMylesBorins
authored andcommitted
n-api: remove unused Test function
Currently when building the following warning is emitted: ../test_symbol.c:4:19: warning: unused function 'Test' [-Wunused-function] static napi_value Test(napi_env env, napi_callback_info info) { ^ 1 warning generated. This commit removes this unused function. PR-URL: #20320 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 44fdd36 commit 705d9ec
Copy full SHA for 705d9ec

File tree

Expand file treeCollapse file tree

1 file changed

+0
-25
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-25
lines changed
Open diff view settings
Collapse file

‎test/addons-napi/test_symbol/test_symbol.c‎

Copy file name to clipboardExpand all lines: test/addons-napi/test_symbol/test_symbol.c
-25Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
11
#include <node_api.h>
22
#include "../common.h"
33

4-
static napi_value Test(napi_env env, napi_callback_info info) {
5-
size_t argc = 1;
6-
napi_value args[1];
7-
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL));
8-
9-
NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments");
10-
11-
napi_valuetype valuetype;
12-
NAPI_CALL(env, napi_typeof(env, args[0], &valuetype));
13-
14-
NAPI_ASSERT(env, valuetype == napi_symbol,
15-
"Wrong type of arguments. Expects a symbol.");
16-
17-
char buffer[128];
18-
size_t buffer_size = 128;
19-
20-
NAPI_CALL(env, napi_get_value_string_utf8(
21-
env, args[0], buffer, buffer_size, NULL));
22-
23-
napi_value output;
24-
NAPI_CALL(env, napi_create_string_utf8(env, buffer, buffer_size, &output));
25-
26-
return output;
27-
}
28-
294
static napi_value New(napi_env env, napi_callback_info info) {
305
size_t argc = 1;
316
napi_value args[1];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.