mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Fix unused-but-set-global warnings in clang-23
This commit is contained in:
7 files changed
+17
-14
Notes:
git
2026-06-25 07:00:51 +00:00
No files matched your search
@@ -40,7 +40,6 @@ static VALUE RFLOAT_0;
|
||||
VALUE rb_cComplex;
|
||||
|
||||
static ID id_abs, id_arg,
|
||||
id_denominator, id_numerator,
|
||||
id_real_p, id_i_real, id_i_imag,
|
||||
id_finite_p, id_infinite_p, id_rationalize,
|
||||
id_PI;
|
||||
@@ -2696,8 +2695,6 @@ Init_Complex(void)
|
||||
VALUE compat;
|
||||
id_abs = rb_intern_const("abs");
|
||||
id_arg = rb_intern_const("arg");
|
||||
id_denominator = rb_intern_const("denominator");
|
||||
id_numerator = rb_intern_const("numerator");
|
||||
id_real_p = rb_intern_const("real?");
|
||||
id_i_real = rb_intern_const("@real");
|
||||
id_i_imag = rb_intern_const("@image"); /* @image, not @imag */
|
||||
|
||||
@@ -5138,7 +5138,11 @@ rb_hash_new_with_bulk_insert(long argc, const VALUE *argv)
|
||||
return val;
|
||||
}
|
||||
|
||||
#undef USE_ORIGENVIRON
|
||||
#if !defined(_WIN32) && !(defined(HAVE_SETENV) && defined(HAVE_UNSETENV))
|
||||
# define USE_ORIGENVIRON 1
|
||||
static char **origenviron;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#define GET_ENVIRON(e) ((e) = rb_w32_get_environ())
|
||||
#define FREE_ENVIRON(e) rb_w32_free_environ(e)
|
||||
@@ -7678,7 +7682,9 @@ Init_Hash(void)
|
||||
* Hack to get RDoc to regard ENV as a class:
|
||||
* envtbl = rb_define_class("ENV", rb_cObject);
|
||||
*/
|
||||
#ifdef USE_ORIGENVIRON
|
||||
origenviron = environ;
|
||||
#endif
|
||||
envtbl = TypedData_Wrap_Struct(rb_cObject, &env_data_type, NULL);
|
||||
rb_extend_object(envtbl, rb_mEnumerable);
|
||||
RB_OBJ_SET_SHAREABLE(envtbl);
|
||||
|
||||
@@ -193,8 +193,10 @@ VALUE rb_mWaitWritable;
|
||||
|
||||
static VALUE rb_eEAGAINWaitReadable;
|
||||
static VALUE rb_eEAGAINWaitWritable;
|
||||
#if EAGAIN != EWOULDBLOCK
|
||||
static VALUE rb_eEWOULDBLOCKWaitReadable;
|
||||
static VALUE rb_eEWOULDBLOCKWaitWritable;
|
||||
#endif
|
||||
static VALUE rb_eEINPROGRESSWaitWritable;
|
||||
static VALUE rb_eEINPROGRESSWaitReadable;
|
||||
|
||||
@@ -208,7 +210,7 @@ VALUE rb_default_rs;
|
||||
|
||||
static VALUE argf;
|
||||
|
||||
static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding, id_fileno;
|
||||
static ID id_write, id_read, id_flush, id_readpartial, id_set_encoding, id_fileno;
|
||||
static VALUE sym_mode, sym_perm, sym_flags, sym_extenc, sym_intenc, sym_encoding, sym_open_args;
|
||||
static VALUE sym_textmode, sym_binmode, sym_autoclose;
|
||||
static VALUE sym_SET, sym_CUR, sym_END;
|
||||
@@ -15698,7 +15700,6 @@ Init_IO(void)
|
||||
|
||||
id_write = rb_intern_const("write");
|
||||
id_read = rb_intern_const("read");
|
||||
id_getc = rb_intern_const("getc");
|
||||
id_flush = rb_intern_const("flush");
|
||||
id_readpartial = rb_intern_const("readpartial");
|
||||
id_set_encoding = rb_intern_const("set_encoding");
|
||||
@@ -15746,10 +15747,8 @@ Init_IO(void)
|
||||
rb_eEAGAINWaitWritable = rb_define_class_under(rb_cIO, "EAGAINWaitWritable", rb_eEAGAIN);
|
||||
rb_include_module(rb_eEAGAINWaitWritable, rb_mWaitWritable);
|
||||
#if EAGAIN == EWOULDBLOCK
|
||||
rb_eEWOULDBLOCKWaitReadable = rb_eEAGAINWaitReadable;
|
||||
/* same as IO::EAGAINWaitReadable */
|
||||
rb_define_const(rb_cIO, "EWOULDBLOCKWaitReadable", rb_eEAGAINWaitReadable);
|
||||
rb_eEWOULDBLOCKWaitWritable = rb_eEAGAINWaitWritable;
|
||||
/* same as IO::EAGAINWaitWritable */
|
||||
rb_define_const(rb_cIO, "EWOULDBLOCKWaitWritable", rb_eEAGAINWaitWritable);
|
||||
#else
|
||||
|
||||
@@ -99,7 +99,7 @@ shortlen(size_t len, BDIGIT *ds)
|
||||
#define TYPE_LINK '@'
|
||||
|
||||
static ID s_dump, s_load, s_mdump, s_mload;
|
||||
static ID s_dump_data, s_load_data, s_alloc, s_call;
|
||||
static ID s_dump_data, s_load_data, s_call;
|
||||
static ID s_getbyte, s_read, s_write, s_binmode;
|
||||
static ID s_encoding_short, s_ruby2_keywords_flag;
|
||||
#define s_encoding_long rb_id_encoding()
|
||||
@@ -110,7 +110,6 @@ static ID s_encoding_short, s_ruby2_keywords_flag;
|
||||
#define name_s_mload "marshal_load"
|
||||
#define name_s_dump_data "_dump_data"
|
||||
#define name_s_load_data "_load_data"
|
||||
#define name_s_alloc "_alloc"
|
||||
#define name_s_call "call"
|
||||
#define name_s_getbyte "getbyte"
|
||||
#define name_s_read "read"
|
||||
@@ -2577,7 +2576,6 @@ Init_marshal(void)
|
||||
set_id(s_mload);
|
||||
set_id(s_dump_data);
|
||||
set_id(s_load_data);
|
||||
set_id(s_alloc);
|
||||
set_id(s_call);
|
||||
set_id(s_getbyte);
|
||||
set_id(s_read);
|
||||
|
||||
+1
-3
@@ -53,8 +53,7 @@ RBIMPL_WARNING_POP()
|
||||
|
||||
VALUE rb_cRational;
|
||||
|
||||
static ID id_abs, id_integer_p,
|
||||
id_i_num, id_i_den;
|
||||
static ID id_abs, id_i_num, id_i_den;
|
||||
|
||||
#define id_idiv idDiv
|
||||
#define id_to_i idTo_i
|
||||
@@ -2769,7 +2768,6 @@ Init_Rational(void)
|
||||
{
|
||||
VALUE compat;
|
||||
id_abs = rb_intern_const("abs");
|
||||
id_integer_p = rb_intern_const("integer?");
|
||||
id_i_num = rb_intern_const("@numerator");
|
||||
id_i_den = rb_intern_const("@denominator");
|
||||
|
||||
|
||||
@@ -114,6 +114,7 @@ extern void onig_set_warn_func(OnigWarnFunc f)
|
||||
extern void onig_set_verb_warn_func(OnigWarnFunc f)
|
||||
{
|
||||
onig_verb_warn = f;
|
||||
(void)onig_verb_warn;
|
||||
}
|
||||
|
||||
static void CC_DUP_WARN(ScanEnv *env, OnigCodePoint from, OnigCodePoint to);
|
||||
|
||||
+5
-1
@@ -30,7 +30,9 @@ static ID id_unblock;
|
||||
|
||||
static ID id_yield;
|
||||
|
||||
#ifdef FIBER_SCHEDULER_CALL_TIMEOUT_AFTER
|
||||
static ID id_timeout_after;
|
||||
#endif
|
||||
static ID id_kernel_sleep;
|
||||
static ID id_process_wait;
|
||||
|
||||
@@ -314,7 +316,9 @@ Init_Fiber_Scheduler(void)
|
||||
id_unblock = rb_intern_const("unblock");
|
||||
id_yield = rb_intern_const("yield");
|
||||
|
||||
#ifdef FIBER_SCHEDULER_CALL_TIMEOUT_AFTER
|
||||
id_timeout_after = rb_intern_const("timeout_after");
|
||||
#endif
|
||||
id_kernel_sleep = rb_intern_const("kernel_sleep");
|
||||
id_process_wait = rb_intern_const("process_wait");
|
||||
|
||||
@@ -555,7 +559,7 @@ rb_fiber_scheduler_yield(VALUE scheduler)
|
||||
return rb_fiber_scheduler_kernel_sleep(scheduler, RB_INT2NUM(0));
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef FIBER_SCHEDULER_CALL_TIMEOUT_AFTER
|
||||
/*
|
||||
* Document-method: Fiber::Scheduler#timeout_after
|
||||
* call-seq: timeout_after(duration, exception_class, *exception_arguments, &block) -> result of block
|
||||
|
||||
Reference in new issue
Block a user