Skip to content

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

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

Closed
alxmcr opened this issue Feb 6, 2019 · 1 comment
Closed

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

alxmcr opened this issue Feb 6, 2019 · 1 comment

Comments

@alxmcr
Copy link

alxmcr commented Feb 6, 2019

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?

> [email protected] 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`
@eGust
Copy link

eGust commented Feb 22, 2019

I had the same issue on mac with 3.4.1.
Seems only dart-sass ships with fibers as a dev-dependency which makes eslint of vscode continually crashing. But when I looked into the lock file there is no package depends on it. I had to manually remove it from dependencies.

@haoqunjiang haoqunjiang added the needs team repro We acknowledged your report and will soon try to reproduce it label Feb 22, 2019
haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Mar 13, 2019
@LinusBorg LinusBorg added enhancement has PR and removed needs team repro We acknowledged your report and will soon try to reproduce it labels Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants