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

test, tools: suppress addon function cast warnings #25663

Closed
wants to merge 3 commits into from

Commits on Jan 28, 2019

  1. test, tools: suppress addon function cast warnings

    Currently, there are a number of compiler warnings generated when
    building the addons on Linux, for example:
    
    make[1]: Entering directory '/node/test/addons/zlib-binding/build'
      CXX(target) Release/obj.target/binding/binding.o
      SOLINK_MODULE(target) Release/obj.target/binding.node
      COPY Release/binding.node
    make[1]: Leaving directory '/node/test/addons/zlib-binding/build'
    In file included from ../binding.cc:1:
    /node/src/node.h:515:51: warning:
    cast between incompatible function types from
    'void (*)(v8::Local<v8::Object>,
              v8::Local<v8::Value>,
              v8::Local<v8::Context>)' to
    'node::addon_context_register_func' {aka
    'void (*)(v8::Local<v8::Object>,
              v8::Local<v8::Value>,
              v8::Local<v8::Context>,
              void*)'} [-Wcast-function-type]
    (node::addon_context_register_func) (regfunc), \
    					   ^
    /node/src/node.h:533:3:
    note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
       NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../binding.cc:58:1:
    note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
     NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize)
     ^~~~~~~~~~~~~~~~~~~~~~~~~
    
    This commit adds the flag -Wno-cast-function-type to suppress these
    warnings. With this change the warnings are not displayed anymore and
    the output matches that of osx when running
    'make -j8 test/addons/.buildstamp'.
    danbev committed Jan 28, 2019
    Configuration menu
    Copy the full SHA
    ede6c4a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b81432d View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2019

  1. Configuration menu
    Copy the full SHA
    c692e51 View commit details
    Browse the repository at this point in the history