More warnings fixes by riccardom (patch 2157019)

Also removed the unused execute_gdb function.
This commit is contained in:
yabause 2008-10-17 10:28:01 +00:00
parent 53b18ff23d
commit 34f2a1c6e5
6 changed files with 21 additions and 67 deletions

View File

@ -38,8 +38,6 @@ image screenshell;
OSDCLASS::OSDCLASS(u8 core)
{
int i;
memset(screen, 0, sizeof(screen));
memset(name,0,7);
//memset(line, 0, sizeof(line));
@ -142,7 +140,6 @@ void OSDCLASS::addFixed(u16 x, u16 y, const char *fmt, ...)
va_end(list);
int len=strlen(msg);
if (strcmp(msg, old_msg) == 0) return;
render51.PrintString<DesmumeFont>(1,0,0,render51.MakeColor(128,0,0),msg,&screenshell);

View File

@ -247,8 +247,7 @@ extern volatile BOOL execute;
TEMPLATE static u32 FASTCALL OP_UND()
{
u32 i = cpu->instruction;
LOG("Undefined instruction: %08X\n", i);
LOG("Undefined instruction: %08X\n", cpu->instruction);
execute = FALSE;
LOG("Stopped (OP_UND)\n");
return 1;
@ -6505,7 +6504,7 @@ TEMPLATE static u32 FASTCALL OP_LDMDB()
TEMPLATE static u32 FASTCALL OP_LDMIA_W()
{
u32 i = cpu->instruction, c = 0, count;
u32 i = cpu->instruction, c = 0;
u32 start = cpu->R[REG_POS(i,16)];
u32 bitList = (~((2 << REG_POS(i,16))-1)) & 0xFFFF;
@ -6550,7 +6549,7 @@ TEMPLATE static u32 FASTCALL OP_LDMIA_W()
TEMPLATE static u32 FASTCALL OP_LDMIB_W()
{
u32 i = cpu->instruction, c = 0, count;
u32 i = cpu->instruction, c = 0;
u32 start = cpu->R[REG_POS(i,16)];
u32 bitList = (~((2 << REG_POS(i,16))-1)) & 0xFFFF;
@ -6597,7 +6596,7 @@ TEMPLATE static u32 FASTCALL OP_LDMIB_W()
TEMPLATE static u32 FASTCALL OP_LDMDA_W()
{
u32 i = cpu->instruction, c = 0, count;
u32 i = cpu->instruction, c = 0;
u32 start = cpu->R[REG_POS(i,16)];
u32 bitList = (~((2 << REG_POS(i,16))-1)) & 0xFFFF;
@ -6642,7 +6641,7 @@ TEMPLATE static u32 FASTCALL OP_LDMDA_W()
TEMPLATE static u32 FASTCALL OP_LDMDB_W()
{
u32 i = cpu->instruction, c = 0, count;
u32 i = cpu->instruction, c = 0;
u32 start = cpu->R[REG_POS(i,16)];
u32 bitList = (~((2 << REG_POS(i,16))-1)) & 0xFFFF;
u32 * registres = cpu->R;
@ -6984,7 +6983,7 @@ TEMPLATE static u32 FASTCALL OP_LDMIB2_W()
{
u32 i = cpu->instruction;
u32 c = 0;
u32 oldmode;
u32 start = cpu->R[REG_POS(i,16)];
u32 * registres;

View File

@ -191,7 +191,7 @@ void armcp15_setSingleRegionAccess(armcp15_t *armcp15,unsigned long dAccess,unsi
} ;
/* precalculate region masks/sets from cp15 register */
void armcp15_maskPrecalc(armcp15_t *armcp15)
static void armcp15_maskPrecalc(armcp15_t *armcp15)
{
#define precalc(num) { \
u32 mask = 0, set = 0xFFFFFFFF ; /* (x & 0) == 0xFF..FF is allways false (disabled) */ \
@ -407,7 +407,7 @@ BOOL armcp15_moveCP2ARM(armcp15_t *armcp15, u32 * R, u8 CRn, u8 CRm, u8 opcode1,
}
u32 CP15wait4IRQ(armcpu_t *cpu)
static u32 CP15wait4IRQ(armcpu_t *cpu)
{
/* on the first call, wirq is not set */
if(cpu->wirq)

View File

@ -645,7 +645,7 @@ processPacket_gdb( SOCKET_TYPE sock, const uint8_t *packet,
if ( hexToInt(&rx_ptr, &length)) {
if ( *rx_ptr++ == ':') {
uint8_t write_byte;
int i;
unsigned int i;
DEBUG_LOG("Memory write of %d bytes to %08x\n",
length, addr);
@ -997,49 +997,6 @@ check_breaks_gdb( struct gdb_stub_state *gdb_state,
return found_break;
}
static int
execute_gdb( void *data, uint32_t instr_addr, int thumb) {
struct gdb_stub_state *gdb_state = (struct gdb_stub_state *)data;
int execute = 1;
if ( gdb_state->active) {
if ( gdb_state->main_stop_flag) {
execute = 0;
}
else {
if ( gdb_state->ctl_stub_state == gdb_stub_state::STOPPED_GDB_STATE ||
gdb_state->emu_stub_state != gdb_stub_state::RUNNING_EMU_GDB_STATE) {
execute = 0;
}
else {
/* see if there is a breakpoint at this instruction */
if ( gdb_state->instr_breakpoints != NULL) {
if ( gdb_state->ctl_stub_state != gdb_stub_state::STEPPING_GDB_STATE &&
gdb_state->ctl_stub_state != gdb_stub_state::START_RUN_GDB_STATE) {
struct breakpoint_gdb *bpoint = gdb_state->instr_breakpoints;
while ( bpoint != NULL && execute) {
if ( bpoint->addr == instr_addr) {
DEBUG_LOG("Breakpoint hit at %08x\n", instr_addr);
gdb_state->emu_stub_state = gdb_stub_state::STOPPING_EMU_GDB_STATE;
gdb_state->stop_type = STOP_BREAKPOINT;
execute = 0;
}
bpoint = bpoint->next;
}
}
}
if ( execute && gdb_state->ctl_stub_state == gdb_stub_state::START_RUN_GDB_STATE) {
gdb_state->ctl_stub_state = gdb_stub_state::RUNNING_GDB_STATE;
}
}
}
}
return execute;
}
static void
WINAPI listenerThread_gdb( void *data) {
struct gdb_stub_state *state = (struct gdb_stub_state *)data;
@ -1634,7 +1591,6 @@ createStub_gdb( uint16_t port,
void
destroyStub_gdb( gdbstub_handle_t instance) {
struct gdb_stub_state *stub = (struct gdb_stub_state *)instance;
int status;
causeQuit_gdb( stub);

View File

@ -7,15 +7,17 @@ namespace softrender {
class v3sysfont {
public:
static const int height() { return 7; }
static const int width(char c) { return charByte(c,0); }
static const int pixel(char c, int x, int y) { return charByte(c,width(c)*y+x+1); }
static const bool valid(char c) { return c>=32; }
static const char charByte(char c, int i) {
static int height() { return 7; }
static int width(char c) { return charByte(c,0); }
static int pixel(char c, int x, int y) { return charByte(c,width(c)*y+x+1); }
static bool valid(char c) { return c>=32; }
c -= 32;
if (c<0 || c>96) c = 2;
static char charByte(byte c, int i) {
if (c < 32 || c > 128)
c = 2;
else
c -= 32;
static const char sbA[]=
{4,
@ -934,4 +936,4 @@ namespace softrender {
#undef xx
#undef zz
#undef zz

View File

@ -615,7 +615,7 @@ void WIFI_usTrigger(wifimac_t *wifi)
{
WIFI_triggerIRQ(wifi,WIFI_IRQ_TIMEBEACON) ;
}
/* receive check, given a 2 mbit connection, 2 bits per usec can be transfered. /*
/* receive check, given a 2 mbit connection, 2 bits per usec can be transfered. */
/* for a packet of 32 Bytes, at least 128 usec passed, we will use the 32 byte accuracy to reduce load */
if (!(wifi->RXCheckCounter++ & 0x7F))
{