mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #2602 from Hiroyuki-Matsuzaki/fix_cygwin_gcc_warning
fixed. cygwin-gcc(ver4.8.3) warning in conv_digit()
This commit is contained in:
+3
-6
@@ -1854,13 +1854,10 @@ mrb_cstr_to_inum(mrb_state *mrb, const char *str, int base, int badcheck)
|
||||
unsigned long n = 0;
|
||||
mrb_int val;
|
||||
|
||||
#undef ISDIGIT
|
||||
#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
|
||||
#define conv_digit(c) \
|
||||
(!ISASCII(c) ? -1 : \
|
||||
isdigit(c) ? ((c) - '0') : \
|
||||
islower(c) ? ((c) - 'a' + 10) : \
|
||||
isupper(c) ? ((c) - 'A' + 10) : \
|
||||
(ISDIGIT(c) ? ((c) - '0') : \
|
||||
ISLOWER(c) ? ((c) - 'a' + 10) : \
|
||||
ISUPPER(c) ? ((c) - 'A' + 10) : \
|
||||
-1)
|
||||
|
||||
if (!str) {
|
||||
|
||||
Reference in New Issue
Block a user