Bug 4622 - gamma_state.c:1593: warning: array subscript out of range
Summary: gamma_state.c:1593: warning: array subscript out of range
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/Gamma (show other bugs)
Version: 5.0.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-28 06:08 UTC by dcb314
Modified: 2005-10-07 15:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description dcb314 2005-09-28 06:08:39 UTC
I just tried to compile Fedora development package xorg-x11-6.8.2-54
with a special non-standard version of the usual GNU C compiler.

The compiler said

gamma_state.c:1593: warning: array subscript out of range

The source code is

        WRITE(gmesa->buf, TxBaseAddr12, curTex->TextureBaseAddr[12]);

but

../BUILD/xorg-x11-6.8.2/xc/lib/GL/mesa/drivers/dri/gamma/gamma_context.h:  
uint32_t TextureBaseAddr[GAMMA_TEX_MAXLEVELS];

and

../BUILD/xorg-x11-6.8.2/xc/lib/GL/mesa/drivers/dri/gamma/gamma_context.h:#define
GAMMA_TEX_MAXLEVELS 12

so TextureBaseAddr[12] doesn't exist.  Suggest code rework.
Comment 1 Brian Paul 2005-10-08 08:04:06 UTC
This was fixed in Mesa CVS a while back.  The fix will be in Mesa 6.4 and the
next X.org release.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.