From 7eda0feb6f45346f338c8b75aab91335caf5c1bb Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Tue, 12 Feb 2013 13:31:40 +0000 Subject: [PATCH] fixed some compiler warnings --- bochs/bx_debug/dbg_main.cc | 2 +- bochs/gui/enh_dbg.cc | 5 +++-- bochs/gui/enh_dbg.h | 8 +++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bochs/bx_debug/dbg_main.cc b/bochs/bx_debug/dbg_main.cc index 9f4efb5c2..9813de1a0 100644 --- a/bochs/bx_debug/dbg_main.cc +++ b/bochs/bx_debug/dbg_main.cc @@ -3602,7 +3602,7 @@ void bx_dbg_dump_table(void) return; } - printf("cr3: 0x"FMT_PHY_ADDRX"\n", BX_CPU(dbg_cpu)->cr3); + printf("cr3: 0x"FMT_PHY_ADDRX"\n", (bx_phy_address)BX_CPU(dbg_cpu)->cr3); lin = 0; phy = 0; diff --git a/bochs/gui/enh_dbg.cc b/bochs/gui/enh_dbg.cc index ddd6eec9e..6aa04b522 100644 --- a/bochs/gui/enh_dbg.cc +++ b/bochs/gui/enh_dbg.cc @@ -8,6 +8,7 @@ // // Modified by Bruce Ewing // +// Copyright (C) 2008-2013 The Bochs Project #include "config.h" @@ -1961,7 +1962,7 @@ void FillBrkp() for (i = 0; i < totqty; i++) { WWP_Snapshot[i] = write_watchpoint[i].addr; - sprintf (cols[0],"%08X",write_watchpoint[i].addr); + sprintf (cols[0],"%08X", (Bit32u) write_watchpoint[i].addr); InsertListRow(cols, 18, DUMP_WND, LineCount++, 8); } } @@ -1973,7 +1974,7 @@ void FillBrkp() for (i = 0; i < totqty; i++) { RWP_Snapshot[i] = read_watchpoint[i].addr; - sprintf (cols[0],"%08X",read_watchpoint[i].addr); + sprintf (cols[0],"%08X", (Bit32u) read_watchpoint[i].addr); InsertListRow(cols, 18, DUMP_WND, LineCount++, 8); } } diff --git a/bochs/gui/enh_dbg.h b/bochs/gui/enh_dbg.h index 5ad2973b5..148860626 100644 --- a/bochs/gui/enh_dbg.h +++ b/bochs/gui/enh_dbg.h @@ -8,6 +8,8 @@ // // Modified by Bruce Ewing // +// Copyright (C) 2008-2013 The Bochs Project + #ifndef BX_ENH_DBG_DEF_H #define BX_ENH_DBG_DEF_H @@ -177,8 +179,12 @@ extern short DockOrder; // set the default List "docking" (Reg, ASM, Dump // END of User Customizable settings -#ifndef WIN32 +#if !defined(_MSC_VER) +#if SIZEOF_UNSIGNED_LONG == 8 +#define FMT_LLCAPX "%016lX" +#else #define FMT_LLCAPX "%016llX" +#endif #else #define FMT_LLCAPX "%016I64X" #endif