Disable all warning categories other than RB_WARN_CATEGORY_ALL_BITS

This commit is contained in:
Nobuyoshi Nakada 2023-04-13 15:43:34 +09:00
parent 0ca9a4e743
commit de023b68aa
Notes: git 2023-04-13 09:08:29 +00:00
2 changed files with 6 additions and 3 deletions

View File

@ -148,8 +148,8 @@ rb_syntax_error_append(VALUE exc, VALUE file, int line, int column,
}
static unsigned int warning_disabled_categories = (
1U << RB_WARN_CATEGORY_DEPRECATED |
0);
(1U << RB_WARN_CATEGORY_DEPRECATED) |
~RB_WARN_CATEGORY_ALL_BITS);
static unsigned int
rb_warning_category_mask(VALUE category)

View File

@ -50,7 +50,10 @@ typedef enum {
/** Warning is for experimental features. */
RB_WARN_CATEGORY_EXPERIMENTAL,
RB_WARN_CATEGORY_ALL_BITS = 0x6 /* no RB_WARN_CATEGORY_NONE bit */
RB_WARN_CATEGORY_ALL_BITS = (
(1U << RB_WARN_CATEGORY_DEPRECATED) |
(1U << RB_WARN_CATEGORY_EXPERIMENTAL) |
0)
} rb_warning_category_t;
/** for rb_readwrite_sys_fail first argument */