diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-23 12:38:48 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-23 12:38:48 +0000 |
commit | ab20aee573322b0a67e67d45012d8625e4edf41c (patch) | |
tree | bfcdf91b031052943c02c045ee5229438eb46e69 | |
parent | dc2e3f1ecf6a43f423e41ef67945037878b0dec9 (diff) | |
download | ruby-ab20aee573322b0a67e67d45012d8625e4edf41c.tar.gz |
addr2line.c: add explicit casts for clang on 32bit environment
Assigning uint64_t to size_t or uintptr_t caused a build error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | addr2line.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addr2line.c b/addr2line.c index e5155d93bd..30e7509f4e 100644 --- a/addr2line.c +++ b/addr2line.c @@ -1104,7 +1104,7 @@ debug_info_reader_read_value(DebugInfoReader *reader, uint64_t form, DebugInfoVa /* stroffsetsptr: debug_str_offsets */ break; case DW_FORM_exprloc: - v->size = read_uleb128(reader); + v->size = (size_t)read_uleb128(reader); set_data_value(v, reader->p); reader->p += v->size; break; @@ -1350,7 +1350,7 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr) exit(1); } if (ptr->low_pc <= addr && addr <= ptr->high_pc) { - return ptr->low_pc; + return (uintptr_t)ptr->low_pc; } } else if (ptr->ranges_set) { @@ -1372,7 +1372,7 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr) } else if (ptr->low_pc_set) { if (ptr->low_pc == addr) { - return ptr->low_pc; + return (uintptr_t)ptr->low_pc; } } return false; |