Skip to content

Warning on NODE_API_MODULE macro #888

@Marv-CZ

Description

@Marv-CZ

The NODE_API_MODULE macro produces the missing-declarations warning:

... warning: no previous declaration for 'napi_value__* __napi_Init(napi_env, napi_value)' [-Wmissing-declarations]
napi_value _napi ## regfunc(napi_env env,
^
...: note: in expansion of macro 'NODE_API_MODULE'
NODE_API_MODULE(dnp3, Init);

Why __napi_XXX function in the macro is not static to suppress this warning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions