Skip to content
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
3 changes: 3 additions & 0 deletions ext/date/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

config_string("strict_warnflags") {|w| $warnflags += " #{w}"}

unless try_compile("", "", werror: true)
append_cflags("-Wno-default-const-init-field-unsafe")
end
append_cflags("-Wno-compound-token-split-by-macro") if RUBY_VERSION < "2.7."
have_func("rb_category_warn")
with_werror("", {:werror => true}) do |opt, |
Expand Down
2 changes: 1 addition & 1 deletion hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ ar_hint_first_match(ar_hint_t needle, VALUE haystack)
{
// Common SWAR technique.
// First XOR all bytes so that matching ones are set to 0x00.
VALUE search_mask = AR_HINT_BASE_MASK * needle;
VALUE search_mask = (VALUE)AR_HINT_BASE_MASK * needle;
VALUE matches = haystack ^ search_mask;

// Then turns 0x00 into 0x80, and any other bytes into 0x00.
Expand Down
2 changes: 1 addition & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -6817,7 +6817,7 @@ rb_parser_str_escape(struct parser_params *p, rb_parser_string_t *str)
if (pend < ptr + n)
n = (int)(pend - ptr);
while (n--) {
c = *ptr & 0xf0 >> 4;
c = ((unsigned char)*ptr >> 4) & 0x0f;
charbuf[2] = (c < 10) ? '0' + c : 'A' + c - 10;
c = *ptr & 0x0f;
charbuf[3] = (c < 10) ? '0' + c : 'A' + c - 10;
Expand Down