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

* io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]

this tmp1 is not required after r35538.

* addr2line.c: suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-05-06 12:39:59 +00:00
parent 6051f54260
commit 6a7666e562
3 changed files with 25 additions and 20 deletions

View file

@ -1,3 +1,10 @@
Sun May 6 21:34:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
* io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]
this tmp1 is not required after r35538.
* addr2line.c: suppress warnings.
Sun May 6 18:39:39 2012 Koichi Sasada <ko1@atdot.net> Sun May 6 18:39:39 2012 Koichi Sasada <ko1@atdot.net>
* compile.c (iseq_compile_each): remove unused variable `size'. * compile.c (iseq_compile_each): remove unused variable `size'.

View file

@ -220,19 +220,19 @@ parse_debug_line_cu(int num_traces, void **traces,
int default_is_stmt, line_base; int default_is_stmt, line_base;
unsigned int header_length, minimum_instruction_length, line_range, unsigned int header_length, minimum_instruction_length, line_range,
opcode_base; opcode_base;
unsigned char *standard_opcode_lengths; /* unsigned char *standard_opcode_lengths; */
/* The registers. */ /* The registers. */
unsigned long addr = 0; unsigned long addr = 0;
unsigned int file = 1; unsigned int file = 1;
unsigned int line = 1; unsigned int line = 1;
unsigned int column = 0; /* unsigned int column = 0; */
int is_stmt; int is_stmt;
int basic_block = 0; /* int basic_block = 0; */
int end_sequence = 0; /* int end_sequence = 0; */
int prologue_end = 0; /* int prologue_end = 0; */
int epilogue_begin = 0; /* int epilogue_begin = 0; */
unsigned int isa = 0; /* unsigned int isa = 0; */
p = *debug_line; p = *debug_line;
@ -268,7 +268,7 @@ parse_debug_line_cu(int num_traces, void **traces,
opcode_base = *(unsigned char *)p; opcode_base = *(unsigned char *)p;
p++; p++;
standard_opcode_lengths = (unsigned char *)p - 1; /* standard_opcode_lengths = (unsigned char *)p - 1; */
p += opcode_base - 1; p += opcode_base - 1;
include_directories = p; include_directories = p;
@ -288,7 +288,7 @@ parse_debug_line_cu(int num_traces, void **traces,
do { \ do { \
fill_line(num_traces, traces, addr, file, line, \ fill_line(num_traces, traces, addr, file, line, \
include_directories, filenames, lines); \ include_directories, filenames, lines); \
basic_block = prologue_end = epilogue_begin = 0; \ /*basic_block = prologue_end = epilogue_begin = 0;*/ \
} while (0) } while (0)
while (p < cu_end) { while (p < cu_end) {
@ -311,13 +311,13 @@ parse_debug_line_cu(int num_traces, void **traces,
file = (unsigned int)uleb128(&p); file = (unsigned int)uleb128(&p);
break; break;
case DW_LNS_set_column: case DW_LNS_set_column:
column = (unsigned int)uleb128(&p); /*column = (unsigned int)*/(void)uleb128(&p);
break; break;
case DW_LNS_negate_stmt: case DW_LNS_negate_stmt:
is_stmt = !is_stmt; is_stmt = !is_stmt;
break; break;
case DW_LNS_set_basic_block: case DW_LNS_set_basic_block:
basic_block = 1; /*basic_block = 1; */
break; break;
case DW_LNS_const_add_pc: case DW_LNS_const_add_pc:
a = ((255 - opcode_base) / line_range) * a = ((255 - opcode_base) / line_range) *
@ -329,28 +329,28 @@ parse_debug_line_cu(int num_traces, void **traces,
addr += a; addr += a;
break; break;
case DW_LNS_set_prologue_end: case DW_LNS_set_prologue_end:
prologue_end = 1; /* prologue_end = 1; */
break; break;
case DW_LNS_set_epilogue_begin: case DW_LNS_set_epilogue_begin:
epilogue_begin = 1; /* epilogue_begin = 1; */
break; break;
case DW_LNS_set_isa: case DW_LNS_set_isa:
isa = (unsigned int)uleb128(&p); /* isa = (unsigned int)*/(void)uleb128(&p);
break; break;
case 0: case 0:
a = *(unsigned char *)p++; a = *(unsigned char *)p++;
op = *p++; op = *p++;
switch (op) { switch (op) {
case DW_LNE_end_sequence: case DW_LNE_end_sequence:
end_sequence = 1; /* end_sequence = 1; */
FILL_LINE(); FILL_LINE();
addr = 0; addr = 0;
file = 1; file = 1;
line = 1; line = 1;
column = 0; /* column = 0; */
is_stmt = default_is_stmt; is_stmt = default_is_stmt;
end_sequence = 0; /* end_sequence = 0; */
isa = 0; /* isa = 0; */
break; break;
case DW_LNE_set_address: case DW_LNE_set_address:
addr = *(unsigned long *)p; addr = *(unsigned long *)p;

2
io.c
View file

@ -8786,7 +8786,6 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt)
enc = find_encoding(v2); enc = find_encoding(v2);
if (enc == enc2) { if (enc == enc2) {
/* Special case - "-" => no transcoding */ /* Special case - "-" => no transcoding */
VALUE tmp1 = rb_check_string_type(v1);
enc2 = NULL; enc2 = NULL;
} }
} }
@ -8794,7 +8793,6 @@ io_encoding_set(rb_io_t *fptr, VALUE v1, VALUE v2, VALUE opt)
enc = find_encoding(v2); enc = find_encoding(v2);
if (enc == enc2) { if (enc == enc2) {
/* Special case - "-" => no transcoding */ /* Special case - "-" => no transcoding */
VALUE tmp1 = rb_check_string_type(v1);
enc2 = NULL; enc2 = NULL;
} }
} }