[Bf-committers] GCC warning: array subscript is above array bounds

Cyril Brulebois kibi at debian.org
Sat May 3 07:26:47 CEST 2008


Hi,

while compiling an svn snapshot (namely r14660), I noticed the
following:
| Compiling ==> 'drawimage.c'
| source/blender/src/drawimage.c: In function ‘draw_uvs_sima’:
| source/blender/src/drawimage.c:615: warning: array subscript is above array bounds

And indeed, “col[3]” is written into, while only “col[3]” was declared
in the first place.


That also happens in another place:
| Compiling ==> 'constraint.c'
| source/blender/blenkernel/intern/constraint.c: In function ‘trackto_evaluate’:
| source/blender/blenkernel/intern/constraint.c:1107: warning: array subscript is above array bounds
| source/blender/blenkernel/intern/constraint.c:1108: warning: array subscript is above array bounds
| source/blender/blenkernel/intern/constraint.c:1109: warning: array subscript is above array bounds

This time, “m[{0,1,2}][3]” are accessed, while the function signature
has “float m[][3]”.

I've just checked the diff between this revision and r14666, and it
looks like this is still valid.

Mraw,
KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.blender.org/pipermail/bf-committers/attachments/20080503/86c1d7a9/attachment.pgp 


More information about the Bf-committers mailing list