summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-31 03:44:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-31 03:44:57 +0000
commit48de1e292a4f65840f01d31c5f8607f6b585057d (patch)
tree29af77d2e1dd1c8e44e522ac84847ab4de84afa1 /addr2line.c
parentf83d4b17804f11a78a8c6f877543a7c55b734dd2 (diff)
* addr2line.c: suppressed shorten-64-to-32 warnings.
* regcomp.c: ditto. * regexec.c: ditto. * regint.h: ditto. * regparse.c: ditto. * regparse.h: ditto. * time.c: ditto. * variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/addr2line.c b/addr2line.c
index 91b4be99ab..6726f9fcf9 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -116,7 +116,7 @@ sleb128(char **p) {
}
static const char *
-get_nth_dirname(int dir, char *p)
+get_nth_dirname(unsigned long dir, char *p)
{
if (!dir--) {
return "";
@@ -125,7 +125,7 @@ get_nth_dirname(int dir, char *p)
while (*p) p++;
p++;
if (!*p) {
- fprintf(stderr, "Unexpected directory number %d in %s\n",
+ fprintf(stderr, "Unexpected directory number %lu in %s\n",
dir, binary_filename);
return "";
}
@@ -298,10 +298,10 @@ parse_debug_line_cu(int num_traces, void **traces,
break;
}
case DW_LNS_set_file:
- file = uleb128(&p);
+ file = (unsigned int)uleb128(&p);
break;
case DW_LNS_set_column:
- column = uleb128(&p);
+ column = (unsigned int)uleb128(&p);
break;
case DW_LNS_negate_stmt:
is_stmt = !is_stmt;
@@ -325,7 +325,7 @@ parse_debug_line_cu(int num_traces, void **traces,
epilogue_begin = 1;
break;
case DW_LNS_set_isa:
- isa = uleb128(&p);
+ isa = (unsigned int)uleb128(&p);
break;
case 0:
a = *(unsigned char *)p++;
@@ -360,13 +360,13 @@ parse_debug_line_cu(int num_traces, void **traces,
}
break;
default: {
- unsigned int addr_incr;
- int line_incr;
+ unsigned long addr_incr;
+ unsigned long line_incr;
a = op - opcode_base;
addr_incr = (a / line_range) * minimum_instruction_length;
line_incr = line_base + (a % line_range);
- addr += addr_incr;
- line += line_incr;
+ addr += (unsigned int)addr_incr;
+ line += (unsigned int)line_incr;
FILL_LINE();
}
}