Skip to content

Commit

Permalink
rb_enc_compile_warn and rb_enc_compile_warning are printf format
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 19, 2024
1 parent b47533f commit 8c0b57d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions internal/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*,
PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
PRINTF_ARGS(void rb_enc_compile_warning(rb_encoding *enc, const char *file, int line, const char *fmt, ...), 4, 5);
PRINTF_ARGS(void rb_enc_compile_warn(rb_encoding *enc, const char *file, int line, const char *fmt, ...), 4, 5);
rb_warning_category_t rb_warning_category_from_name(VALUE category);
bool rb_warning_category_enabled_p(rb_warning_category_t category);
VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
Expand Down
3 changes: 0 additions & 3 deletions prism_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -9280,9 +9280,6 @@ pm_parse_process_error(const pm_parse_result_t *result)
return error;
}

void rb_enc_compile_warning(rb_encoding *enc, const char *file, int line, const char *fmt, ...);
void rb_enc_compile_warn(rb_encoding *enc, const char *file, int line, const char *fmt, ...);

/**
* Parse the parse result and raise a Ruby error if there are any syntax errors.
* It returns an error if one should be raised. It is assumed that the parse
Expand Down

0 comments on commit 8c0b57d

Please sign in to comment.