Fixed warnings of VC2008
This commit is contained in:
parent
d891f0d8ec
commit
72d72c92d4
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dbg_main.cc,v 1.108 2007-12-13 22:56:35 sshwarts Exp $
|
||||
// $Id: dbg_main.cc,v 1.109 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -1070,7 +1070,7 @@ void bx_dbg_xlate_address(bx_lin_address laddr)
|
||||
bx_phy_address paddr;
|
||||
laddr &= BX_CONST64(0xfffffffffffff000);
|
||||
|
||||
bx_bool paddr_valid = BX_CPU(which_cpu)->dbg_xlate_linear2phy(laddr, &paddr);
|
||||
bx_bool paddr_valid = BX_CPU(dbg_cpu)->dbg_xlate_linear2phy(laddr, &paddr);
|
||||
if (paddr_valid) {
|
||||
dbg_printf("linear page 0x" FMT_ADDRX " maps to physical page 0x%08x\n", laddr, paddr);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: dis_groups.cc,v 1.38 2007-09-19 19:38:10 sshwarts Exp $
|
||||
// $Id: dis_groups.cc,v 1.39 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdio.h>
|
||||
@ -588,11 +588,12 @@ void disassembler::Jb(const x86_insn *insn)
|
||||
Bit8s imm8 = (Bit8s) fetch_byte();
|
||||
|
||||
if (insn->is_64) {
|
||||
Bit64u imm64 = (Bit64s) imm8;
|
||||
Bit64u imm64 = (Bit8s) imm8;
|
||||
dis_sprintf(".+0x%08x%08x", GET32H(imm64), GET32L(imm64));
|
||||
|
||||
if (db_base != BX_JUMP_TARGET_NOT_REQ) {
|
||||
Bit64u target = db_eip + (Bit64s) imm64; target += db_base;
|
||||
Bit64u target = db_eip + imm64;
|
||||
target += db_base;
|
||||
dis_sprintf(" (0x%08x%08x)", GET32H(target), GET32L(target));
|
||||
}
|
||||
|
||||
@ -600,20 +601,21 @@ void disassembler::Jb(const x86_insn *insn)
|
||||
}
|
||||
|
||||
if (insn->os_32) {
|
||||
Bit32u imm32 = (Bit32s) imm8;
|
||||
Bit32u imm32 = (Bit8s) imm8;
|
||||
dis_sprintf(".+0x%08x", (unsigned) imm32);
|
||||
|
||||
if (db_base != BX_JUMP_TARGET_NOT_REQ) {
|
||||
Bit32u target = db_eip + (Bit32s) imm32; target += db_base;
|
||||
Bit32u target = (Bit32u)(db_eip + (Bit32s) imm32);
|
||||
target += db_base;
|
||||
dis_sprintf(" (0x%08x)", target);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Bit16u imm16 = (Bit16s) imm8;
|
||||
Bit16u imm16 = (Bit8s) imm8;
|
||||
dis_sprintf(".+0x%04x", (unsigned) imm16);
|
||||
|
||||
if (db_base != BX_JUMP_TARGET_NOT_REQ) {
|
||||
Bit16u target = (db_eip + (Bit16s) imm16) & 0xffff;
|
||||
Bit16u target = (Bit16u)((db_eip + (Bit16s) imm16) & 0xffff);
|
||||
dis_sprintf(" (0x%08x)", target + db_base);
|
||||
}
|
||||
}
|
||||
@ -638,11 +640,12 @@ void disassembler::Jd(const x86_insn *insn)
|
||||
Bit32s imm32 = (Bit32s) fetch_dword();
|
||||
|
||||
if (insn->is_64) {
|
||||
Bit64u imm64 = (Bit64s) imm32;
|
||||
Bit64u imm64 = (Bit32s) imm32;
|
||||
dis_sprintf(".+0x%08x%08x", GET32H(imm64), GET32L(imm64));
|
||||
|
||||
if (db_base != BX_JUMP_TARGET_NOT_REQ) {
|
||||
Bit64u target = db_eip + (Bit64s) imm64; target += db_base;
|
||||
Bit64u target = db_eip + (Bit64s) imm64;
|
||||
target += db_base;
|
||||
dis_sprintf(" (0x%08x%08x)", GET32H(target), GET32L(target));
|
||||
}
|
||||
|
||||
@ -650,9 +653,9 @@ void disassembler::Jd(const x86_insn *insn)
|
||||
}
|
||||
|
||||
dis_sprintf(".+0x%08x", (unsigned) imm32);
|
||||
|
||||
if (db_base != BX_JUMP_TARGET_NOT_REQ) {
|
||||
Bit32u target = db_eip + (Bit32s) imm32; target += db_base;
|
||||
Bit32u target = (Bit32u)(db_eip + (Bit32s) imm32);
|
||||
target += db_base;
|
||||
dis_sprintf(" (0x%08x)", target);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: eth_null.cc,v 1.19 2005-12-10 18:37:35 vruppert Exp $
|
||||
// $Id: eth_null.cc,v 1.20 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -119,7 +119,7 @@ bx_null_pktmover_c::sendpkt(void *buf, unsigned io_len)
|
||||
BX_DEBUG (("sendpkt length %u", io_len));
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
unsigned int n = fwrite (buf, io_len, 1, txlog);
|
||||
size_t n = fwrite (buf, io_len, 1, txlog);
|
||||
if (n != 1) BX_ERROR(("fwrite to txlog failed, io_len = %u", io_len));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf(txlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
@ -148,7 +148,7 @@ void bx_null_pktmover_c::rx_timer_handler (void *this_ptr)
|
||||
BX_DEBUG (("receive packet length %u", io_len));
|
||||
// dump raw bytes to a file, eventually dump in pcap format so that
|
||||
// tcpdump -r FILE can interpret them for us.
|
||||
int n = fwrite (buf, io_len, 1, class_ptr->rxlog);
|
||||
size_t n = fwrite (buf, io_len, 1, class_ptr->rxlog);
|
||||
if (n != 1) BX_ERROR(("fwrite to rxlog failed, io_len = %u", io_len));
|
||||
// dump packet in hex into an ascii log file
|
||||
fprintf(class_ptr->rxlog_txt, "NE2K transmitting a packet, length %u\n", io_len);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pciusb.cc,v 1.60 2007-09-28 19:52:03 sshwarts Exp $
|
||||
// $Id: pciusb.cc,v 1.61 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2004 MandrakeSoft S.A.
|
||||
@ -89,7 +89,7 @@ void usb_dump_packet(Bit8u *data, unsigned size)
|
||||
|
||||
int set_usb_string(Bit8u *buf, const char *str)
|
||||
{
|
||||
int len, i;
|
||||
size_t len, i;
|
||||
Bit8u *q;
|
||||
|
||||
q = buf;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: logio.cc,v 1.62 2007-10-24 23:28:00 sshwarts Exp $
|
||||
// $Id: logio.cc,v 1.63 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -330,8 +330,8 @@ void logfunctions::put(const char *p)
|
||||
prefix = NULL;
|
||||
}
|
||||
|
||||
int len=strlen(p);
|
||||
for(int i=1;i<len+1;i++) {
|
||||
size_t len=strlen(p);
|
||||
for(size_t i=1;i<len+1;i++) {
|
||||
tmpbuf[i]=p[i-1];
|
||||
}
|
||||
|
||||
@ -618,10 +618,10 @@ logfunc_t *genlog = NULL;
|
||||
|
||||
void bx_center_print(FILE *file, char *line, int maxwidth)
|
||||
{
|
||||
int len = strlen(line);
|
||||
size_t len = strlen(line);
|
||||
if (len > maxwidth)
|
||||
BX_PANIC(("bx_center_print: line is too long: '%s'", line));
|
||||
int imax = (maxwidth - len) >> 1;
|
||||
for (int i=0; i<imax; i++) fputc(' ', file);
|
||||
size_t imax = (maxwidth - len) >> 1;
|
||||
for (size_t i=0; i<imax; i++) fputc(' ', file);
|
||||
fputs(line, file);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: misc_mem.cc,v 1.107 2007-12-23 17:21:28 sshwarts Exp $
|
||||
// $Id: misc_mem.cc,v 1.108 2007-12-30 18:02:22 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -90,7 +90,7 @@ void BX_MEM_C::init_memory(Bit32u memsize)
|
||||
{
|
||||
unsigned idx;
|
||||
|
||||
BX_DEBUG(("Init $Id: misc_mem.cc,v 1.107 2007-12-23 17:21:28 sshwarts Exp $"));
|
||||
BX_DEBUG(("Init $Id: misc_mem.cc,v 1.108 2007-12-30 18:02:22 sshwarts Exp $"));
|
||||
|
||||
alloc_vector_aligned(memsize+ BIOSROMSZ + EXROMSIZE + 4096, BX_MEM_VECTOR_ALIGN);
|
||||
BX_MEM_THIS len = memsize;
|
||||
@ -243,7 +243,7 @@ void BX_MEM_C::load_ROM(const char *path, bx_phy_address romaddress, Bit8u type)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
romaddress = (bx_phy_address)(-size);
|
||||
romaddress = -size;
|
||||
}
|
||||
offset = romaddress & BIOS_MASK;
|
||||
if ((romaddress & 0xf0000) < 0xf0000) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user