cbor-ruby icon indicating copy to clipboard operation
cbor-ruby copied to clipboard

Compilation warnings against RUBY 2.7.1

Open MauriceS-gti opened this issue 4 years ago • 0 comments

I am trying to cross compile cbor-ruby as a custom package inside buildroot - but that is another painful story - it keeps selecting the native compiler instead of the cross compiler - but it shows the following warnings: I am NOT a ruby programmer by any means, so I have entered new territory here:

root/build/buildroot-top/buildroot/output/host/bin/ruby -I. ../../../../ext/cbor/extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
checking for rb_big_new() in ruby.h... yes
checking for rb_intern_str() in ruby.h... yes
checking for rb_sym2str() in ruby.h... yes
checking for rb_str_intern() in ruby.h... yes
checking for rb_integer_unpack() in ruby.h... yes
creating Makefile
cd -
cd tmp/x86_64-linux/cbor/2.7.1
/usr/bin/make
compiling ../../../../ext/cbor/buffer.c
compiling ../../../../ext/cbor/buffer_class.c
../../../../ext/cbor/buffer_class.c: In function 'read_until_eof':
../../../../ext/cbor/buffer_class.c:270:17: warning: passing argument 3 of 'rb_rescue2' from incompatible pointer type [-Wincompatible-pointer-types]
                 read_until_eof_error, (VALUE)(void*) args,
                 ^~~~~~~~~~~~~~~~~~~~
In file included from /root/build/buildroot-top/buildroot/output/host/include/ruby-2.7.0/ruby.h:33:0,
                 from ../../../../ext/cbor/compat.h:30,
                 from ../../../../ext/cbor/buffer_class.c:28:
/root/build/buildroot-top/buildroot/output/host/include/ruby-2.7.0/ruby/ruby.h:1988:7: note: expected 'VALUE (*)(VALUE,  VALUE) {aka long unsigned int (*)(long unsigned int,  long unsigned int)}' but argument is of type 'VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}'
 VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
       ^~~~~~~~~~
compiling ../../../../ext/cbor/core_ext.c
compiling ../../../../ext/cbor/packer.c
compiling ../../../../ext/cbor/packer_class.c
compiling ../../../../ext/cbor/rbinit.c
compiling ../../../../ext/cbor/rmem.c
compiling ../../../../ext/cbor/unpacker.c
compiling ../../../../ext/cbor/unpacker_class.c
../../../../ext/cbor/unpacker_class.c: In function 'Unpacker_each':
../../../../ext/cbor/unpacker_class.c:281:17: warning: passing argument 3 of 'rb_rescue2' from incompatible pointer type [-Wincompatible-pointer-types]
                 Unpacker_rescue_EOFError, self,
                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/build/buildroot-top/buildroot/output/host/include/ruby-2.7.0/ruby.h:33:0,
                 from ../../../../ext/cbor/compat.h:30,
                 from ../../../../ext/cbor/buffer.h:32,
                 from ../../../../ext/cbor/unpacker.h:30,
                 from ../../../../ext/cbor/unpacker_class.c:28:
/root/build/buildroot-top/buildroot/output/host/include/ruby-2.7.0/ruby/ruby.h:1988:7: note: expected 'VALUE (*)(VALUE,  VALUE) {aka long unsigned int (*)(long unsigned int,  long unsigned int)}' but argument is of type 'VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}'
 VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
       ^~~~~~~~~~
linking shared-object cbor/cbor.so

This warning looks concerning...

MauriceS-gti avatar Jul 16 '20 15:07 MauriceS-gti