On 03/29/12 12:41 PM, Stephan Raue wrote: > Hi, > > building xorg-server-1.11.4 with gcc-4.7.0 gives me follow error: > > > main.c: In function 'main': > main.c:138:13: warning: assignment discards 'const' qualifier from pointer > target type [enabled by default] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > main.c:171:10: error: array subscript is outside array bounds > [-Werror=array-bounds] > cc1: some warnings being treated as errors
Seems like a bug in your brand new compiler, since the code appears correct. http://cgit.freedesktop.org/xorg/xserver/tree/dix/main.c?id=xorg-server-1.11.4#n167 shows the code in question is: for (i=1; i<MAXCLIENTS; i++) clients[i] = NullClient; and include/dix.h defines that array as: extern _X_EXPORT ClientPtr clients[MAXCLIENTS]; -- -Alan Coopersmith- [email protected] Oracle Solaris Engineering - http://blogs.oracle.com/alanc _______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: [email protected]
