xnd-project / libxnd

Subsumed into xnd
https://xnd.io/
BSD 3-Clause "New" or "Revised" License
81 stars 12 forks source link

Fix compile error #35

Closed mrkn closed 5 years ago

mrkn commented 5 years ago

This commit fixes the following compile error with -Wreturn-type.

In file included from ./ruby_xnd_internal.h:52:
./util.h:148:6: error: non-void function 'rb_range_unpack' should return a value [-Wreturn-type]
     return;
     ^
float_pack_unpack.c:76:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (i = 0; i < sizeof(float); ++i) {
              ~ ^ ~~~~~~~~~~~~~
float_pack_unpack.c:105:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        for (i = 0; i < sizeof(float); ++i) {
                    ~ ^ ~~~~~~~~~~~~~
float_pack_unpack.c:143:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (i = 0; i < sizeof(double); ++i) {
              ~ ^ ~~~~~~~~~~~~~~
float_pack_unpack.c:166:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
        for (i = 0; i < sizeof(double); ++i) {
                    ~ ^ ~~~~~~~~~~~~~~
7 warnings and 1 error generated.