From 42642407591bd76d2f68eed559e42deef9adc157 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 7 May 2013 13:15:13 +0000 Subject: [PATCH] * ext/readline/readline.c (insert_ignore_escape): Add a cast to unsigned char * before dereference. This suppress a warning on Cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ ext/readline/readline.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b6a0e6ebf4..b6ae703735 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue May 7 22:12:34 2013 Tanaka Akira + + * ext/readline/readline.c (insert_ignore_escape): Add a cast to + unsigned char * before dereference. + This suppress a warning on Cygwin. + Tue May 7 12:15:24 2013 Tanaka Akira * ext/socket/ancdata.c (bsock_recvmsg_internal): Add a cast to diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 502e73e5c8..fe5c7234e5 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -242,7 +242,7 @@ insert_ignore_escape(VALUE self, VALUE prompt) rb_str_cat(last_prompt, s0, s - s0 - 1); s0 = s - 1; while (++s < e && *s) { - if (ISALPHA(*s)) { + if (ISALPHA(*(unsigned char *)s)) { if (!ignoring) { ignoring = 1; rb_str_cat(last_prompt, ignore_code+0, 1);