diff options
author | 2008-05-01 14:12:20 +0000 | |
---|---|---|
committer | 2008-05-01 14:12:20 +0000 | |
commit | 37c56cf592dfc518ba511108566373958f81e377 (patch) | |
tree | 1ba6bf793c359a3a73a0c1ccf59470a9426ddf8f /src/emu | |
parent | e6d23ec6c40b06e97c5d77b0993991c100943a27 (diff) |
01752: Warnings making standard .124u4 in GCC 4.3.0 (mingw)
Well, two of them were valid.
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/machine/idectrl.c | 2 | ||||
-rw-r--r-- | src/emu/uimenu.c | 10 |
2 files changed, 6 insertions, 6 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; } |