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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/node_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct uv_loop_s; // Forward declaration.

typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
napi_value exports);
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)();
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);

// Used by deprecated registration method napi_module_register.
typedef struct napi_module {
Expand Down Expand Up @@ -66,7 +66,7 @@ typedef struct napi_module {

#define NAPI_MODULE_INIT() \
EXTERN_C_START \
NAPI_MODULE_EXPORT int32_t NODE_API_MODULE_GET_API_VERSION() { \
NAPI_MODULE_EXPORT int32_t NODE_API_MODULE_GET_API_VERSION(void) { \
return NAPI_VERSION; \
} \
NAPI_MODULE_EXPORT napi_value NAPI_MODULE_INITIALIZER(napi_env env, \
Expand Down