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

addr2line.c: clarify the type of integer expression

to suppress Coverity Scan warning.
This expression converted uint8_t to int, and then int to unsigned long.
Now it directly converts uint8_t to unsigned long.
This commit is contained in:
Yusuke Endoh 2019-07-15 08:36:57 +09:00
parent 0a417248a0
commit a197579073

View file

@ -432,7 +432,7 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
/*basic_block = 1; */
break;
case DW_LNS_const_add_pc:
a = ((255 - header.opcode_base) / header.line_range) *
a = ((255UL - header.opcode_base) / header.line_range) *
header.minimum_instruction_length;
addr += a;
break;