qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH for 2.12] disas/hppa: Fix compiler errors


From: Stefan Weil
Subject: [Qemu-trivial] [PATCH for 2.12] disas/hppa: Fix compiler errors
Date: Mon, 13 Nov 2017 08:27:15 +0100

gcc (Debian 6.3.0-18) 6.3.0 20170516 reports these errors:

disas/hppa.c:2702:20: error:
 left shift of negative value [-Werror=shift-negative-value]
disas/hppa.c:2718:20: error:
 left shift of negative value [-Werror=shift-negative-value]

Signed-off-by: Stefan Weil <address@hidden>
---

This patch fails with checkpatch.pl because the code uses
tab indention.

 disas/hppa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/disas/hppa.c b/disas/hppa.c
index a2d371fdb1..0d1e99eab3 100644
--- a/disas/hppa.c
+++ b/disas/hppa.c
@@ -2699,7 +2699,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
                    int disp;
 
                    if (sign)
-                     disp = (-1 << 10) | imm10;
+                     disp = (UINT_MAX << 10) | imm10;
                    else
                      disp = imm10;
 
@@ -2715,7 +2715,7 @@ print_insn_hppa (bfd_vma memaddr, disassemble_info *info)
                    int disp;
 
                    if (sign)
-                     disp = (-1 << 11) | imm11;
+                     disp = (UINT_MAX << 11) | imm11;
                    else
                      disp = imm11;
 
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]