This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix ARI new warnings introduced in i386-tdep.c.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=34f8ac9f490fc38a07d03ec8e425c06a2bb737b2

commit 34f8ac9f490fc38a07d03ec8e425c06a2bb737b2
Author: Walfred Tedeschi <walfred.tedeschi@intel.com>
Date:   Thu Jun 11 13:48:26 2015 +0200

    Fix ARI new warnings introduced in i386-tdep.c.
    
    1. gdb/i386-tdep.c:8720: Do not use 'long long', instead use LONGEST
    gdb/i386-tdep.c:8720:  long long int size;
    
    2. gdb/i386-tdep.c:8755: Do not use printf(%ll), instead use printf(%s,phex()) to dump a 'long long' value
    gdb/i386-tdep.c:8755: ui_out_field_fmt (uiout, "size", "%lld", size);
    
    2015-06-11  Walfred Tedeschi  <walfred.tedeschi@intel.com>
    
    	* i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
    	long long int and plongest instead of %ll.
    
    Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>

Diff:
---
 gdb/ChangeLog   | 5 +++++
 gdb/i386-tdep.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a00a22..caaacc9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-11  Walfred Tedeschi  <walfred.tedeschi@intel.com>
+
+	* i386-tdep.c (i386_mpx_print_bounds): use of LONGEST instead of
+	long long int and plongest instead of %ll.
+
 2015-06-11  Gary Benson <gbenson@redhat.com>
 
 	* nat/linux-namespaces.c (gdb_wait.h): New include.
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 6304591..133021f 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -8717,7 +8717,7 @@ static void
 i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
 {
   struct ui_out *uiout = current_uiout;
-  long long int size;
+  LONGEST size;
   struct gdbarch *gdbarch = get_current_arch ();
   CORE_ADDR onecompl = ~((CORE_ADDR) 0);
   int bounds_in_map = ((~bt_entry[1] == 0 && bt_entry[0] == onecompl) ? 1 : 0);
@@ -8752,7 +8752,7 @@ i386_mpx_print_bounds (const CORE_ADDR bt_entry[4])
 
       size = (size > -1 ? size + 1 : size);
       ui_out_text (uiout, ", size = ");
-      ui_out_field_fmt (uiout, "size", "%lld", size);
+      ui_out_field_fmt (uiout, "size", "%s", plongest (size));
 
       ui_out_text (uiout, ", metadata = ");
       ui_out_field_core_addr (uiout, "metadata", gdbarch, bt_entry[3]);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]