Bug 513110

Summary: hatari-0.50-247.49:
Product: [openSUSE] openSUSE 11.2 Reporter: David Binderman <dcb314>
Component: OtherAssignee: Wolfgang Engel <wolfgang.engel>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.1   
URL: http://developer.berlios.de/bugs/?func=detailbug&bug_id=16365&group_id=10436
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2009-06-15 09:48:30 UTC
I just tried to build Factory package hatari-0.50-247.49
and the build said

m68000.c:48:7: warning: array subscript is above array bounds

The source code is

    for(i=0; i<(16+1); i++)
      Regs[i] = 0;

but

hatari-0.50/src/uae-cpu/newcpu.h:    uae_u32 regs[16];

I agree with the compiler. The code looks broken.  Suggest code rework.
Comment 1 Richard Biener 2009-10-17 14:54:18 UTC
David, in case the issues are not introduced by a patch local to openSUSE please report the issues upstream.

Packagers, please do not add openSUSE-local patches to fix this kind of errors but forward the bugs upstream
and close the bugs as RESOLVED UPSTREAM.

Note that it is perfectly fine to have "resource leaks" at the end of a program as the kernel will clean
up for you.  Manually freeing them only increases binary size and runtime.