mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
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>
|
||
|---|---|---|
| .. | ||
| 2_function_arguments | ||
| 3_callbacks | ||
| 4_object_factory | ||
| 5_function_factory | ||
| 6_object_wrap | ||
| 7_factory_wrap | ||
| 8_passing_wrapped | ||
| test_array | ||
| test_bigint | ||
| test_constructor | ||
| test_conversions | ||
| test_dataview | ||
| test_date | ||
| test_error | ||
| test_exception | ||
| test_function | ||
| test_general | ||
| test_handle_scope | ||
| test_new_target | ||
| test_number | ||
| test_object | ||
| test_promise | ||
| test_properties | ||
| test_reference | ||
| test_string | ||
| test_symbol | ||
| test_typedarray | ||
| .gitignore | ||
| common.h | ||
| entry_point.c | ||
| testcfg.py | ||