1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
naruse 2011-01-31 03:44:57 +00:00
parent f83d4b1780
commit 48de1e292a
9 changed files with 73 additions and 61 deletions

View file

@ -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();
}
}