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

Build warning in function.c - incompatible pointer type #297

Closed
djberg96 opened this issue Nov 1, 2013 · 2 comments
Closed

Build warning in function.c - incompatible pointer type #297

djberg96 opened this issue Nov 1, 2013 · 2 comments

Comments

@djberg96
Copy link
Contributor

djberg96 commented Nov 1, 2013

ruby 2.0.0p247 (2013-06-27) [x64-mingw32]

I noticed this warning while building ffi 1.9.3 with the Devkit on Windows 7 with Ruby 2.0.0p247 (64-bit) and thought I should mention it:

Function.c: In function 'callback_invoke':
Function.c:479:9: warning: passing argument 1 of 'rb_thread_call_with_gvl' from incompatible pointer type [enabled by default]
Function.c:102:14: note: expected 'void * (*)(void *)' but argument is of type 'VALUE (*)(void *)'
@larskanis
Copy link
Member

Thanks for reporting this. The return value of rb_thread_call_with_gvl() was changed based on this discussion: http://bugs.ruby-lang.org/issues/5543
In FFI this return value is not used, but the function signature should be fixed. I'll do that.

larskanis added a commit to larskanis/ffi that referenced this issue Nov 16, 2013
The return type is not used but caused a compiler warning:
  Function.c: In function 'callback_invoke':
  Function.c:479:9: warning: passing argument 1 of 'rb_thread_call_with_gvl' from incompatible pointer type [enabled by default]
  Function.c:102:14: note: expected 'void * (*)(void *)' but argument is of type 'VALUE (*)(void *)'

This addresses issue ffi#297.
@tduehr
Copy link
Member

tduehr commented Jun 7, 2014

Fixed with #309

@tduehr tduehr closed this as completed Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants