Google
  Web www.spinics.net

Re: builderror xorg-server-1.11.4 with gcc-4.7.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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-              alan.coopersmith@xxxxxxxxxx
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
_______________________________________________
xorg@xxxxxxxxxxx: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: list-xorg@xxxxxxxxxxx


[X Forum]     [Nouveau Driver]     [Devices]     [XFree86]     [XFree86 Newbie]     [Site Home]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]     [Linux Resources]

Powered by Linux