From a1975790731e1e9081e41e05b43516065b7d950a Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 15 Jul 2019 08:36:57 +0900 Subject: 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. --- addr2line.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addr2line.c') 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; -- cgit v1.2.3