maprules.c:1095: error: array subscript is not an integer

Daniel Stone daniel at fooishbar.org
Wed May 24 10:14:23 PDT 2006


On Wed, May 24, 2006 at 10:09:10AM -0700, Jeremy C. Reed wrote:
> Building xorg-server-1.1.0 on NetBSD 3.99.18 fails here:
> 
>  cc -DHAVE_CONFIG_H -I. -I../include 
> -I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include 
> -I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include/freetype2 
> -DHAVE_DIX_CONFIG_H -DXFree86Server -DXFree86LOADER -DHAVE_XKB_CONFIG_H 
> -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
> -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE 
> -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I../Xext -I../composite -I../damageext 
> -I../xfixes -I../Xi -I../mi -I../miext/shadow -I../miext/damage 
> -I../render -I../randr -I../fb -O2 -MT maprules.lo -MD -MP -MF 
> .deps/maprules.Tpo -c maprules.c -fPIC -DPIC -o .libs/maprules.o
> maprules.c: In function `XkbRF_LoadDescriptions':
> maprules.c:1095: error: array subscript is not an integer
> maprules.c:1142: warning: subscript has type `char'
> *** Error code 1
> 
> Stop.
> make: stopped in 
> /home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/xorg-ser
> ver-1.1.0/xkb
> *** Error code 1
> 
> 
> From the commit logs, I see this code has been changed a couple times. 
> First it changed to strcmp with the tolower and then it removed the 
> tolower for a few but not this one.
> 
> My fix is:
> 
> --- maprules.c.orig	2006-05-24 09:50:09.000000000 -0700
> +++ maprules.c	2006-05-24 10:05:22.000000000 -0700
> @@ -1092,7 +1092,7 @@
>      for ( ; GetInputLine(file,&line,False); line.num_line= 0) {
>  	if (line.line[0]=='!') {
>  	    tok = strtok(&(line.line[1]), " \t");
> -	    if (_XkbStrCaseCmp(tolower(tok),"model") == 0)
> +	    if (_XkbStrCaseCmp(tok,"model") == 0)
>  		headingtype = HEAD_MODEL;
>  	    else if (_XkbStrCaseCmp(tok,"layout") == 0)
>  		headingtype = HEAD_LAYOUT;
> 
> 
> Okay to commit? (Was this an oversight? Or is it supposed to be this 
> way?) This is untested, but this builds now.

Yes, please do commit.  Either I missed this one altogether (unlikely),
or I just forgot to commit to the 1.1 branch (more probable).  Ugh.



More information about the xorg mailing list