summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-05-01 14:12:20 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-05-01 14:12:20 +0000
commit37c56cf592dfc518ba511108566373958f81e377 (patch)
tree1ba6bf793c359a3a73a0c1ccf59470a9426ddf8f
parente6d23ec6c40b06e97c5d77b0993991c100943a27 (diff)
01752: Warnings making standard .124u4 in GCC 4.3.0 (mingw)
Well, two of them were valid.
-rw-r--r--src/emu/machine/idectrl.c2
-rw-r--r--src/emu/uimenu.c10
-rw-r--r--src/mame/machine/seicop.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index a927a510c36..3e2e71c43fa 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -418,7 +418,7 @@ static void swap_strncpy(UINT8 *dst, const char *src, int field_size_in_words)
{
int i;
- for (i = 0; i < field_size_in_words * 2 && src[i]; i++)
+ for (i = 0; i < field_size_in_words * 2 && src[i] != 0; i++)
dst[i ^ 1] = src[i];
for ( ; i < field_size_in_words * 2; i++)
dst[i ^ 1] = ' ';
diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c
index b27d5940e5c..94d5ed5ef27 100644
--- a/src/emu/uimenu.c
+++ b/src/emu/uimenu.c
@@ -123,7 +123,7 @@ static char select_game_buffer[40];
static const game_driver *select_game_list[VISIBLE_GAMES_IN_LIST];
static const game_driver **select_game_driver_list;
-static dip_descriptor dip_switch_model[MAX_PHYSICAL_DIPS];
+static dip_descriptor dip_switch_model[MAX_PHYSICAL_DIPS + 1];
static bitmap_t *hilight_bitmap;
static render_texture *hilight_texture;
@@ -227,10 +227,10 @@ INLINE const char *CLIB_DECL ATTR_PRINTF(1,2) menu_string_pool_add(const char *f
INLINE int get_num_dips(void)
{
- int num = 0;
-
- while (dip_switch_model[num].dip_name != NULL && num < MAX_PHYSICAL_DIPS)
- num++;
+ int num;
+ for (num = 0; num < MAX_PHYSICAL_DIPS; num++)
+ if (dip_switch_model[num].dip_name == NULL)
+ break;
return num;
}
diff --git a/src/mame/machine/seicop.c b/src/mame/machine/seicop.c
index b1a9d2d0947..1aaa382d032 100644
--- a/src/mame/machine/seicop.c
+++ b/src/mame/machine/seicop.c
@@ -145,7 +145,7 @@ void copd2_set_tabledata(UINT16 data, running_machine *machine)
/*Movement protection*//*Legionnaire,Heated Barrel*/
-static UINT32 cop_register[5];
+static UINT32 cop_register[6];
/*Sprite DMA protection*//*SD Gundam*/
static UINT8 dma_status;
static UINT32 dma_src;