aboutsummaryrefslogtreecommitdiffstats
path: root/addr2line.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-07-15 08:36:57 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-07-15 08:38:37 +0900
commita1975790731e1e9081e41e05b43516065b7d950a (patch)
tree8fd018b29ab3b589a995a3311ee9c8e82df9e126 /addr2line.c
parent0a417248a0ba6e4e5093f916dbf9b31e22f24078 (diff)
downloadruby-a1975790731e1e9081e41e05b43516065b7d950a.tar.gz
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.
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addr2line.c b/addr2line.c
index f6befce53e..9e7df4e7fb 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -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;