- when VC++ sees local variables in a for statement, it doesn't think

that they go out of scope at the end, so it complains about duplicate
  definitions.
This commit is contained in:
Bryce Denney 2002-11-19 05:51:52 +00:00
parent ae2abb8c0d
commit 97f911d1fe
2 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: apic.cc,v 1.26 2002-11-19 05:47:43 bdenney Exp $
// $Id: apic.cc,v 1.27 2002-11-19 05:51:52 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
#define NEED_CPU_REG_SHORTCUTS 1
@ -180,6 +180,7 @@ bx_generic_apic_c::get_delivery_bitmask (Bit8u dest, Bit8u dest_mode)
bx_bool
bx_generic_apic_c::deliver (Bit8u dest, Bit8u dest_mode, Bit8u delivery_mode, Bit8u vector, Bit8u polarity, Bit8u trig_mode)
{
int bit;
// return false if we can't deliver for any reason, so that the caller
// knows not to clear its IRR.
Bit32u deliver_bitmask = get_delivery_bitmask (dest, dest_mode);
@ -221,7 +222,7 @@ bx_generic_apic_c::deliver (Bit8u dest, Bit8u dest_mode, Bit8u delivery_mode, Bi
return true;
case 6: // Start Up (local apic only)
BX_ASSERT (get_type () == APIC_TYPE_LOCAL_APIC);
for (int bit=0; bit<APIC_MAX_ID; bit++)
for (bit=0; bit<APIC_MAX_ID; bit++)
if (deliver_bitmask & (1<<bit))
apic_index[bit]->startup_msg (vector);
return true;
@ -235,7 +236,7 @@ bx_generic_apic_c::deliver (Bit8u dest, Bit8u dest_mode, Bit8u delivery_mode, Bi
// Fixed delivery mode
if (bx_dbg.apic)
BX_INFO(("delivering vector=0x%02x to bitmask=%04x", (int)vector, deliver_bitmask));
for (int bit=0; bit<APIC_MAX_ID; bit++) {
for (bit=0; bit<APIC_MAX_ID; bit++) {
if (deliver_bitmask & (1<<bit)) {
if (apic_index[bit] == NULL)
BX_INFO(("IOAPIC: delivering int0x%x to nonexistent id=%d!", (unsigned)vector, bit));

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: pci.cc,v 1.26 2002-11-19 05:47:45 bdenney Exp $
// $Id: pci.cc,v 1.27 2002-11-19 05:51:52 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -71,33 +71,33 @@ bx_pci_c::~bx_pci_c(void)
bx_pci_c::init(void)
{
// called once when bochs initializes
unsigned i;
BX_PCI_THIS num_pci_handles = 0;
/* set unused elements to appropriate values */
for (unsigned i=0; i < BX_MAX_PCI_DEVICES; i++) {
for (i=0; i < BX_MAX_PCI_DEVICES; i++) {
BX_PCI_THIS pci_handler[i].read = NULL;
BX_PCI_THIS pci_handler[i].write = NULL;
}
for (unsigned i=0; i < 0x100; i++) {
for (i=0; i < 0x100; i++) {
BX_PCI_THIS pci_handler_id[i] = BX_MAX_PCI_DEVICES; // not assigned
}
DEV_register_ioread_handler(this, read_handler, 0x0CF8, "i440FX", 4);
for (unsigned i=0x0CFC; i<=0x0CFF; i++) {
for (i=0x0CFC; i<=0x0CFF; i++) {
DEV_register_ioread_handler(this, read_handler, i, "i440FX", 7);
}
DEV_register_iowrite_handler(this, write_handler, 0x0CF8, "i440FX", 4);
for (unsigned i=0x0CFC; i<=0x0CFF; i++) {
for (i=0x0CFC; i<=0x0CFF; i++) {
DEV_register_iowrite_handler(this, write_handler, i, "i440FX", 7);
}
DEV_register_pci_handlers(this, pci_read_handler, pci_write_handler,
0x00, "440FX Host bridge");
for (unsigned i=0; i<256; i++)
for (i=0; i<256; i++)
BX_PCI_THIS s.i440fx.pci_conf[i] = 0x0;
// readonly registers
BX_PCI_THIS s.i440fx.pci_conf[0x00] = 0x86;