node/test/js-native-api
Daniel Bevenius cccd3a3849
test: fix compiler warning in test_string.c
Currently, the following compiler warnings is generated:

../test_string.c:235:50: warning:
incompatible pointer types passing 'char [1]' to parameter of type
'const char16_t *' (aka 'const unsigned short *')
[-Wincompatible-pointer-types]
NAPI_CALL(env, napi_create_string_utf16(env,
    "", ((size_t)INT_MAX) + 1, &output));
    ^~
../../common.h:50:23: note: expanded from macro 'NAPI_CALL'
  NAPI_CALL_BASE(env, the_call, NULL)
                      ^~~~~~~~
../../common.h:42:10: note: expanded from macro 'NAPI_CALL_BASE'
    if ((the_call) != napi_ok) {                               \
         ^~~~~~~~
/node/src/js_native_api.h:80:66: note:
passing argument to parameter 'str' here const char16_t* str,
                                                         ^
1 warning generated.

This commit adds a cast to silence this warning.

PR-URL: https://github.com/nodejs/node/pull/26539
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-14 11:02:51 +01:00
..
2_function_arguments test: partition N-API tests 2018-12-07 13:32:42 +01:00
3_callbacks test: partition N-API tests 2018-12-07 13:32:42 +01:00
4_object_factory test: partition N-API tests 2018-12-07 13:32:42 +01:00
5_function_factory test: partition N-API tests 2018-12-07 13:32:42 +01:00
6_object_wrap test: partition N-API tests 2018-12-07 13:32:42 +01:00
7_factory_wrap test: partition N-API tests 2018-12-07 13:32:42 +01:00
8_passing_wrapped test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_array benchmark,doc,lib,test: capitalize comments 2019-03-04 15:13:25 +01:00
test_bigint test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_constructor doc,lib,test: capitalize comment sentences 2018-12-25 02:35:52 -05:00
test_conversions test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_dataview test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_date n-api: implement date object 2019-03-01 10:41:47 +01:00
test_error test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_exception test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_function benchmark,doc,lib,test: capitalize comments 2019-03-14 11:02:41 +01:00
test_general benchmark,doc,lib,test: capitalize comments 2019-03-14 11:02:41 +01:00
test_handle_scope benchmark,doc,lib,test: capitalize comments 2019-03-14 11:02:41 +01:00
test_new_target test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_number tools: capitalize sentences 2018-12-17 22:53:34 +00:00
test_object test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_promise test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_properties benchmark,doc,lib,test: capitalize comments 2019-03-14 11:02:41 +01:00
test_reference test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_string test: fix compiler warning in test_string.c 2019-03-14 11:02:51 +01:00
test_symbol test: partition N-API tests 2018-12-07 13:32:42 +01:00
test_typedarray benchmark,doc,lib,test: capitalize comments 2019-03-04 15:13:25 +01:00
.gitignore test: partition N-API tests 2018-12-07 13:32:42 +01:00
common.h test: partition N-API tests 2018-12-07 13:32:42 +01:00
entry_point.c test: partition N-API tests 2018-12-07 13:32:42 +01:00
testcfg.py test: partition N-API tests 2018-12-07 13:32:42 +01:00