aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-01 18:27:41 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-01 18:27:41 +0000
commita4b82bcc2f4910292abffb203e6ad7b1ed7d7316 (patch)
treebbade861982175a02a4d4de63d3d49a19914bbf6 /string.c
parent4681313253ad27b45a9a58c1ec971cab5c1c2298 (diff)
downloadruby-a4b82bcc2f4910292abffb203e6ad7b1ed7d7316.tar.gz
fix mixed declaration on non UNALIGNED_WORD_ACCESS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/string.c b/string.c
index 6d90ce9085..459b6e9a4d 100644
--- a/string.c
+++ b/string.c
@@ -422,6 +422,7 @@ VALUE rb_fs;
static inline const char *
search_nonascii(const char *p, const char *e)
{
+ const uintptr_t *s, *t;
#if SIZEOF_VOIDP == 8
# define NONASCII_MASK 0x8080808080808080ULL
#elif SIZEOF_VOIDP == 4
@@ -450,8 +451,8 @@ search_nonascii(const char *p, const char *e)
#else
{
#endif
- const uintptr_t *s = (const uintptr_t *)p;
- const uintptr_t *t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
+ s = (const uintptr_t *)p;
+ t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
for (;s < t; s++) {
if (*s & NONASCII_MASK) {
#ifdef WORDS_BIGENDIAN