diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-09 22:41:53 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-01-10 00:25:46 +0100 |
commit | ae180b6b52640512fcf0bf6b05bba3449b409640 (patch) | |
tree | 8c014a5fed8afd2ca35bed302c6c478a07e4d604 /nx-X11/programs | |
parent | 3c3e11cb02886d05694b72c29c3deca0e3170c71 (diff) | |
download | nx-libs-ae180b6b52640512fcf0bf6b05bba3449b409640.tar.gz nx-libs-ae180b6b52640512fcf0bf6b05bba3449b409640.tar.bz2 nx-libs-ae180b6b52640512fcf0bf6b05bba3449b409640.zip |
xkb: fix shadow warnings
xkb.c: In function ‘ProcXkbSetCompatMap’:
xkb.c:2601:20: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
register unsigned i,bit;
^
xkb.c:2529:23: note: shadowed declaration is here
register unsigned i,bit;
^
xkb.c:2601:22: warning: declaration of ‘bit’ shadows a previous local [-Wshadow=compatible-local]
register unsigned i,bit;
^~~
xkb.c:2529:25: note: shadowed declaration is here
register unsigned i,bit;
^~~
Backport of this xorg upstream commit:
commit 344eea237fc07dedfd733d14f95ed0ad26bb5f81
Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Date: Tue Oct 16 02:04:34 2012 -0500
xkb: fix shadow warnings
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/ddxList.c | 1 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkb.c | 21 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkbtext.c | 1 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkmread.c | 1 |
5 files changed, 12 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index 449828a59..ee5d63fac 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -136,7 +136,6 @@ char tmpname[PATH_MAX]; file= list->pattern[what]; map= strrchr(file,'('); if (map!=NULL) { - char *tmp; map++; tmp= strrchr(map,')'); if ((tmp==NULL)||(tmp[1]!='\0')) { diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 238b0897e..7b392fa09 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -876,21 +876,21 @@ XkbWriteKeyTypes( XkbDescPtr xkb, buf= (char *)&wire[1]; if (wire->nMapEntries>0) { - xkbKTMapEntryWireDesc * wire; + xkbKTMapEntryWireDesc * ewire; XkbKTMapEntryPtr entry; - wire= (xkbKTMapEntryWireDesc *)buf; + ewire= (xkbKTMapEntryWireDesc *)buf; entry= type->map; - for (n=0;n<type->map_count;n++,wire++,entry++) { - wire->active= entry->active; - wire->mask= entry->mods.mask; - wire->level= entry->level; - wire->realMods= entry->mods.real_mods; - wire->virtualMods= entry->mods.vmods; + for (n=0;n<type->map_count;n++,ewire++,entry++) { + ewire->active= entry->active; + ewire->mask= entry->mods.mask; + ewire->level= entry->level; + ewire->realMods= entry->mods.real_mods; + ewire->virtualMods= entry->mods.vmods; if (client->swapped) { - swaps(&wire->virtualMods); + swaps(&ewire->virtualMods); } } - buf= (char *)wire; + buf= (char *)ewire; if (type->preserve!=NULL) { xkbModsWireDesc * pwire; XkbModsPtr preserve; @@ -2598,7 +2598,6 @@ ProcXkbSetCompatMap(ClientPtr client) } if (stuff->groups!=0) { - register unsigned i,bit; xkbModsWireDesc *wire = (xkbModsWireDesc *)data; for (i=0,bit=1;i<XkbNumKbdGroups;i++,bit<<=1) { if (stuff->groups&bit) { diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c index 253b4654e..a26cd88c2 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c @@ -117,12 +117,12 @@ unsigned ndx; return; } if ( rg->currentDown!=0 ) { - int key = xE->u.u.detail; + int tmpkey = xE->u.u.detail; xE->u.u.type= KeyRelease; xE->u.u.detail= rg->currentDown; XkbHandleActions(keybd,keybd,xE,count); xE->u.u.type= KeyPress; - xE->u.u.detail= key; + xE->u.u.detail= tmpkey; } rg->currentDown= key; } diff --git a/nx-X11/programs/Xserver/xkb/xkbtext.c b/nx-X11/programs/Xserver/xkb/xkbtext.c index dc1c712ae..0110b64e0 100644 --- a/nx-X11/programs/Xserver/xkb/xkbtext.c +++ b/nx-X11/programs/Xserver/xkb/xkbtext.c @@ -1271,7 +1271,6 @@ char buf[256],*tmp; } else if (type==XkbKB_RadioGroup) { int g; - char *tmp; g= ((behavior->data)&(~XkbKB_RGAllowNone))+1; if (XkbKB_RGAllowNone&behavior->data) { sprintf(buf,"allowNone,"); diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c index b24c43e03..3bb4414e3 100644 --- a/nx-X11/programs/Xserver/xkb/xkmread.c +++ b/nx-X11/programs/Xserver/xkb/xkmread.c @@ -636,7 +636,6 @@ XkbDescPtr xkb; bzero((char *)typeName,XkbNumKbdGroups*sizeof(Atom)); bzero((char *)type,XkbNumKbdGroups*sizeof(XkbKeyTypePtr)); if (wireMap.flags&XkmKeyHasTypes) { - register int g; for (g=0;g<XkbNumKbdGroups;g++) { if ((wireMap.flags&(1<<g))&& ((tmp=XkmGetCountedString(file,buf,100))>0)) { |