Bug 149713 - 11 * array subscript out of range
Summary: 11 * array subscript out of range
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-themes-extras
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phillip Compton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-25 17:59 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-03 11:10:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-02-25 17:59:57 UTC
Description of problem:

I just tried to compile package gnome-themes-extras-0.8.0-1 from 
Redhat Fedora Extras development tree.

The compiler said

1.

smooth_style.c(1385): warning #175: subscript out of range

The source code is

              gc[3] = dark;

but, only a dozen or so lines earlier,

          GdkGC         *gc[3],

Suggest make gc array one element larger.

2.

smooth_style.c(1394): warning #175: subscript out of range
smooth_style.c(1403): warning #175: subscript out of range
smooth_style.c(1412): warning #175: subscript out of range
smooth_style.c(1423): warning #175: subscript out of range
smooth_style.c(1434): warning #175: subscript out of range
smooth_style.c(1445): warning #175: subscript out of range
smooth_style.c(1458): warning #175: subscript out of range
smooth_style.c(1469): warning #175: subscript out of range
smooth_style.c(1502): warning #175: subscript out of range
smooth_style.c(1518): warning #175: subscript out of range

Duplicates.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Adrian Reber 2005-02-28 09:07:22 UTC
I cannot reproduce this. What compiler are you using? I have tried it with
gcc-3.4.2-6.fc3 and gcc-3.4.3-19 and I don't see the warnings. Have you reported
this bug already upstream?

Comment 2 David Binderman 2005-02-28 10:18:12 UTC
>I cannot reproduce this. 

Agreed.

>What compiler are you using?

Intel 8.1

>I have tried it with gcc-3.4.2-6.fc3 and gcc-3.4.3-19 
>and I don't see the warnings.

That's because the gcc compiler has not been enhanced to
detect this fault. 

Feel free to suggest it as an enhancement.

>Have you reported this bug already upstream?

No, but you can if you like.

Comment 3 Adrian Reber 2005-02-28 17:06:00 UTC
Could you try rebuilding:
http://lisas.de/~adrian/rpm/gnome-themes-extras-0.8.0-2.src.rpm
to see if my try to fix it fixed it?

The fix isn't really necessary as the error happens in the smooth engine
which is not installed as part of this package but as part of the gnome-themes
packages. If this fixes it we can open a bug for gnome-themes and provide the
patch there.

Comment 4 David Binderman 2005-02-28 18:48:22 UTC
>Could you try rebuilding:

I rebuilt your new version, and it seems fine to me.

If you want to get really keen, I also found

utils/misc_functions.c(16): remark #593: variable "depth" was set but never used
utils/misc_functions.c(1015): remark #593: variable "off_3" was set but never used
smooth_style.c(1205): remark #593: variable "data" was set but never used
smooth_style.c(1245): remark #593: variable "x2" was set but never used
smooth_style.c(1245): remark #593: variable "y2" was set but never used
smooth_style.c(1247): remark #593: variable "orientation" was set but never used
smooth_style.c(1253): remark #593: variable "data" was set but never used
industrial_style.c(531): remark #593: variable "width" was set but never used

Comment 5 Adrian Reber 2005-02-28 19:53:32 UTC
I will check the new version in CVS and request a build. Unused variables are
not a real problem.

Comment 6 Adrian Reber 2005-03-03 09:19:43 UTC
Updated version has been build. Phillip, can you close this bug... Because I can't.


Note You need to log in before you can comment on or make changes to this bug.