1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress unused-but-set-variable warning

This commit is contained in:
Nobuyoshi Nakada 2021-07-06 00:09:05 +09:00
parent 3dacc14fd3
commit 3db7f6353f
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

2
ruby.c
View file

@ -934,6 +934,8 @@ feature_option(const char *str, int len, void *arg, const unsigned int enable)
rb_exc_raise(rb_exc_new_str(rb_eRuntimeError, mesg));
#undef ADD_FEATURE_NAME
}
#else
(void)set;
#endif
rb_warn("unknown argument for --%s: `%.*s'",
enable ? "enable" : "disable", len, str);