Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
01752 Compiling Minor Always Apr 25, 2008, 16:05 May 1, 2008, 14:15
Tester Terryn View Status Public Platform MAME (Self-compiled)
Assigned To aaron Resolution Fixed OS Windows XP/Vista 32-bit
Status [?] Resolved Driver
Version 0.124u4 Fixed in Version 0.124u5 Build
Fixed in Git Commit Github Pull Request #
Summary 01752: Warnings making standard .124u4 in GCC 4.3.0 (mingw)
Description With standard settings of "mingw32-make -j2", the most recent MAME will not compile for me due to the below warnings and due to -Werror being set for optimised builds.

src/mame/machine/seicop.c: In function 'sdgndmrb_mcu_w':
src/mame/machine/seicop.c:520: error: array subscript is above array bounds
src/mame/machine/seicop.c:524: error: array subscript is above array bounds
src/mame/machine/seicop.c:530: error: array subscript is above array bounds
src/mame/machine/seicop.c:531: error: array subscript is above array bounds
src/mame/machine/seicop.c:532: error: array subscript is above array bounds
src/mame/machine/seicop.c:532: error: array subscript is above array bounds

EDIT: Removed -Werror to check for more instances. I should have done this in the first place, apologies.

src/emu/uimenu.c: In function 'dip_switch_render':
src/emu/uimenu.c:232: error: array subscript is above array bounds
src/emu/uimenu.c: In function 'menu_switches':
src/emu/uimenu.c:232: error: array subscript is above array bounds

src/emu/machine/idectrl.c: In function 'device_start_ide_controller':
src/emu/machine/idectrl.c:421: error: array subscript is above array bounds
src/emu/machine/idectrl.c:421: error: array subscript is above array bounds
src/emu/machine/idectrl.c:421: error: array subscript is above array bounds
src/emu/machine/idectrl.c:421: error: array subscript is above array bounds
Steps To Reproduce
Additional Information
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
6
User avatar
No.00810
Tafoid
Administrator
Apr 25, 2008, 18:08
You are not using the approved build tools - so there isn't much we can do to help you here. If you were using 4.2.1 (which I believe is the version GCC MAMEDEV uses) - you would get more ready help.

I'll leave it acknowledged until a Dev can comment.
User avatar
No.00812
Haze
Senior Tester
Apr 25, 2008, 19:27
edited on: Apr 25, 2008, 19:28
eh , lines 520 - 532 aren't part of sdgndmrb_mcu_w

(ok, there is an error in there I think, but still.. the warning is wrong)
User avatar
No.00814
Terryn
Tester
Apr 25, 2008, 22:28
Fair enough! I'm only noting it because it happened, and it doesn't hamper making a debug build regardless.
User avatar
No.00817
Robbbert
Senior Tester
Apr 25, 2008, 23:46
The warning is valid. On line 148, it says

static UINT32 cop_register[5];

That is, the valid members are [0] through [4].

The warnings refer to the fact that cop_register[5] is being accessed. This is outside the defined size of the array.

You could change line 148 to [6] and see if that helps.
User avatar
No.00818
Haze
Senior Tester
Apr 26, 2008, 07:45
yes, the line numbers are corect, there is an error, I've already said that.

What I'm saying is that the GCC output is still broken, because those errors aren't in the function it says they're in. They're in dma_transfer, not sdgndmrb_mcu_w
User avatar
No.00844
aaron
Developer
May 1, 2008, 14:15
The idectrl warning is a false positive. The others are fixed.