Bug 154849

Summary: kile-1.8.1-5: array subscript out of range
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: E-mail List <kde-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-03-02 21:58:28 UTC
I just tried to compile package kile-1.8.1-5 with a non standard version 
of the GNU C compiler.

It said

1.

./src/kile/kilestructurewidget.cpp:82: warning: array subscript out of range

The source code is

	m_current=m_child=m_lastChild=m_parent[0]=m_parent[1]=m_parent[2]=m_parent[3]=m_parent[4]=m_parent[5]=m_parent[7]=m_root;

but

linux:/usr/src/packages/SPECS # find ../BUILD/kile-1.8.1/ -name \*.h -print | xargs fgrep m_parent
../BUILD/kile-1.8.1/src/kile/kilestructurewidget.h:             KileListViewItem                   *m_parent[7], *m_current, *m_root, *m_child, *m_lastChild;

so m_parent[7] does not exist. Perhaps m_parent[ 6] was intended.
Suggest code rework.
Comment 1 Stephan Kulow 2006-03-03 13:10:46 UTC
fixed in SVN and will update package too