From 4d6cbb644265d565eb743ffa2bd04092c2b05518 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 20 Jan 2020 12:32:37 +1030 Subject: [PATCH] ubsan: hppa: negation of -2147483648 * hppa-dis.c (fput_const): Remove useless cast. --- opcodes/ChangeLog | 4 ++++ opcodes/hppa-dis.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 04eaa863e7c..de9b9e312dd 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2020-01-20 Alan Modra + + * hppa-dis.c (fput_const): Remove useless cast. + 2020-01-20 Alan Modra * arm-dis.c (print_insn_arm): Wrap 'T' value. diff --git a/opcodes/hppa-dis.c b/opcodes/hppa-dis.c index 3c157017167..93156da7cb0 100644 --- a/opcodes/hppa-dis.c +++ b/opcodes/hppa-dis.c @@ -207,7 +207,7 @@ static void fput_const (unsigned num, disassemble_info *info) { if ((int) num < 0) - (*info->fprintf_func) (info->stream, "-%x", - (int) num); + (*info->fprintf_func) (info->stream, "-%x", -num); else (*info->fprintf_func) (info->stream, "%x", num); } -- 2.30.2