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

Suppress "old style definition" warning #360

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/ox/intern.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static VALUE form_id(const char *str, size_t len) {
return (VALUE)rb_intern3(str, len, rb_utf8_encoding());
}

void ox_hash_init() {
void ox_hash_init(void) {
VALUE cache_class = rb_define_class_under(Ox, "Cache", rb_cObject);
#if RUBY_API_VERSION_CODE >= 30200
rb_undef_alloc_func(cache_class);
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/obj_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static unsigned long get_id_from_attrs(PInfo pi, Attr a) {
return 0;
}

static CircArray circ_array_new() {
static CircArray circ_array_new(void) {
CircArray ca;

ca = ALLOC(struct _circArray);
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/ox.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ static VALUE cache8_test(VALUE self) {
}
#endif

void Init_ox() {
void Init_ox(void) {
#if HAVE_RB_EXT_RACTOR_SAFE
rb_ext_ractor_safe(true);
#endif
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/sax_as.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static VALUE sax_value_empty(VALUE self) {
* Values in the SAX callbacks. They can be converted to various different
* types. with the _as_x()_ methods.
*/
void ox_sax_define() {
void ox_sax_define(void) {
#if 0
ox = rb_define_module("Ox");
#if RUBY_API_VERSION_CODE >= 30200
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/sax_hint.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static struct _hint html_hint_array[] = {
};
static struct _hints html_hints = {"HTML", html_hint_array, sizeof(html_hint_array) / sizeof(*html_hint_array)};

Hints ox_hints_html() {
Hints ox_hints_html(void) {
return &html_hints;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/ox/special.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static Slot cache_get(const char *key) {
return NULL;
}

static void cache_init() {
static void cache_init(void) {
Slot e = entities;

memset(&entity_cache, 0, sizeof(struct _cache));
Expand Down