Skip to content

Warning: cast between incompatible function types from void (*) #3429

Closed
@alxmcr

Description

@alxmcr

Version

3.4.0

Environment info

System:
    OS: Linux 4.18 Ubuntu 18.10 (Cosmic Cuttlefish)
    CPU: (1) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  Binaries:
    Node: 11.1.0 - ~/.nvm/versions/node/v11.1.0/bin/node
    Yarn: Not Found
    npm: 6.4.1 - ~/.nvm/versions/node/v11.1.0/bin/npm
  Browsers:
    Chrome: 72.0.3626.81
    Firefox: 65.0
  npmGlobalPackages:
    @vue/cli: 3.4.0

Steps to reproduce

  1. vue create siac-frontend-v3
  2. Please pick a preset: Manually select features
  3. Check the features needed for your project: Babel, Router, Vuex, CSS Pre-processors
  4. Use history mode for router? (Requires proper server setup for index fallback in production) Yes
  5. Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with dart-sass)
  6. Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
  7. Save this as a preset for future projects? No
  8. Press Enter

What is expected?

I shouldn't exist any error or warning.

What is actually happening?

> fibers@3.1.1 install /home/alex/Documents/Projects_Github/SIAC/v3/siac-frontend-v3/node_modules/fibers
> node build.js || nodejs build.js

make: Entering directory '/home/alex/Documents/Projects_Github/SIAC/v3/siac-frontend-v3/node_modules/fibers/build'
  CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc: In function ‘void uni::SetAccessor(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, uni::FunctionType (*)(v8::Local<v8::String>, const GetterCallbackInfo&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&))’:
../src/fibers.cc:341:87: warning: cast between incompatible function types from ‘uni::FunctionType (*)(v8::Local<v8::String>, const GetterCallbackInfo&)’ {aka ‘void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>&)’} to ‘v8::AccessorNameGetterCallback’ {aka ‘void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)’} [-Wcast-function-type]
   object->SetAccessor(isolate->GetCurrentContext(), name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter).ToChecked();
                                                                                       ^~~~~~
../src/fibers.cc:341:123: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&)’ {aka ‘void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)’} to ‘v8::AccessorNameSetterCallback’ {aka ‘void (*)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&)’} [-Wcast-function-type]
 urrentContext(), name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter).ToChecked();
                                                                                        ^~~~~~

In file included from ../src/coroutine.h:1,
                 from ../src/fibers.cc:1:
../src/fibers.cc: At global scope:
/home/alex/.node-gyp/11.1.0/include/node/node.h:494:43: warning: cast between incompatible function types from ‘void (*)(v8::Handle<v8::Object>)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/home/alex/.node-gyp/11.1.0/include/node/node.h:528:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/fibers.cc:916:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(fibers, init)
 ^~~~~~~~~~~
  CXX(target) Release/obj.target/fibers/src/coroutine.o
  CC(target) Release/obj.target/fibers/src/libcoro/coro.o
  SOLINK_MODULE(target) Release/obj.target/fibers.node
  COPY Release/fibers.node
make: Leaving directory '/home/alex/Documents/Projects_Github/SIAC/v3/siac-frontend-v3/node_modules/fibers/build'
Installed in `/home/alex/Documents/Projects_Github/SIAC/v3/siac-frontend-v3/node_modules/fibers/bin/linux-x64-67-glibc/fibers.node`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions