tenderlove / ds9

Wrapper around nghttp2
80 stars 13 forks source link

Fix compiler warnings when building C extension #21

Closed kaorimatz closed 3 years ago

kaorimatz commented 3 years ago

This PR fixes the following compiler warnings in ds9_frames.c and ds9_option.c, which I missed in #19.

e5bac91

../../../../ext/ds9/ds9_frames.c:130:66: warning: 'rb_cData' is deprecated: by: rb_cObject. Will be removed in 3.1. [-Wdeprecated-declarations]
    cDS9FramesFrame = rb_define_class_under(mDS9Frames, "Frame", rb_cData);
                                                                 ^
../../../../ext/ds9/ds9_option.c:162:56: warning: 'rb_cData' is deprecated: by: rb_cObject. Will be removed in 3.1. [-Wdeprecated-declarations]
    cDS9Option = rb_define_class_under(mDS9, "Option", rb_cData);
                                                       ^

5fe4b25

../../../../ext/ds9/ds9_frames.c:48:18: warning: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'int' [-Wshorten-64-to-32]
            INT2NUM(hd->length),
            ~~~~~~~ ~~~~^~~~~~