xkb: fix shadow warnings
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7f1d74e8a9
commit
344eea237f
|
@ -131,8 +131,6 @@ XkbDDXListComponent(DeviceIntPtr dev,
|
||||||
file = list->pattern[what];
|
file = list->pattern[what];
|
||||||
map = strrchr(file, '(');
|
map = strrchr(file, '(');
|
||||||
if (map != NULL) {
|
if (map != NULL) {
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
map++;
|
map++;
|
||||||
tmp = strrchr(map, ')');
|
tmp = strrchr(map, ')');
|
||||||
if ((tmp == NULL) || (tmp[1] != '\0')) {
|
if ((tmp == NULL) || (tmp[1] != '\0')) {
|
||||||
|
|
27
xkb/xkb.c
27
xkb/xkb.c
|
@ -57,10 +57,10 @@ static RESTYPE RT_XKBCLIENT;
|
||||||
|
|
||||||
#define CHK_DEVICE(dev, id, client, access_mode, lf) {\
|
#define CHK_DEVICE(dev, id, client, access_mode, lf) {\
|
||||||
int why;\
|
int why;\
|
||||||
int rc = lf(&(dev), id, client, access_mode, &why);\
|
int tmprc = lf(&(dev), id, client, access_mode, &why);\
|
||||||
if (rc != Success) {\
|
if (tmprc != Success) {\
|
||||||
client->errorValue = _XkbErrCode2(why, id);\
|
client->errorValue = _XkbErrCode2(why, id);\
|
||||||
return rc;\
|
return tmprc;\
|
||||||
}\
|
}\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1026,22 +1026,22 @@ XkbWriteKeyTypes(XkbDescPtr xkb,
|
||||||
|
|
||||||
buf = (char *) &wire[1];
|
buf = (char *) &wire[1];
|
||||||
if (wire->nMapEntries > 0) {
|
if (wire->nMapEntries > 0) {
|
||||||
xkbKTMapEntryWireDesc *wire;
|
xkbKTMapEntryWireDesc *ewire;
|
||||||
XkbKTMapEntryPtr entry;
|
XkbKTMapEntryPtr entry;
|
||||||
|
|
||||||
wire = (xkbKTMapEntryWireDesc *) buf;
|
ewire = (xkbKTMapEntryWireDesc *) buf;
|
||||||
entry = type->map;
|
entry = type->map;
|
||||||
for (n = 0; n < type->map_count; n++, wire++, entry++) {
|
for (n = 0; n < type->map_count; n++, ewire++, entry++) {
|
||||||
wire->active = entry->active;
|
ewire->active = entry->active;
|
||||||
wire->mask = entry->mods.mask;
|
ewire->mask = entry->mods.mask;
|
||||||
wire->level = entry->level;
|
ewire->level = entry->level;
|
||||||
wire->realMods = entry->mods.real_mods;
|
ewire->realMods = entry->mods.real_mods;
|
||||||
wire->virtualMods = entry->mods.vmods;
|
ewire->virtualMods = entry->mods.vmods;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&wire->virtualMods);
|
swaps(&ewire->virtualMods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf = (char *) wire;
|
buf = (char *) ewire;
|
||||||
if (type->preserve != NULL) {
|
if (type->preserve != NULL) {
|
||||||
xkbModsWireDesc *pwire;
|
xkbModsWireDesc *pwire;
|
||||||
XkbModsPtr preserve;
|
XkbModsPtr preserve;
|
||||||
|
@ -2903,7 +2903,6 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req->groups != 0) {
|
if (req->groups != 0) {
|
||||||
unsigned i, bit;
|
|
||||||
xkbModsWireDesc *wire = (xkbModsWireDesc *) data;
|
xkbModsWireDesc *wire = (xkbModsWireDesc *) data;
|
||||||
|
|
||||||
for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
|
for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) {
|
||||||
|
|
|
@ -104,13 +104,13 @@ XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr keybd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rg->currentDown != 0) {
|
if (rg->currentDown != 0) {
|
||||||
int key = event->detail.key;
|
int tmpkey = event->detail.key;
|
||||||
|
|
||||||
event->type = ET_KeyRelease;
|
event->type = ET_KeyRelease;
|
||||||
event->detail.key = rg->currentDown;
|
event->detail.key = rg->currentDown;
|
||||||
XkbHandleActions(keybd, keybd, event);
|
XkbHandleActions(keybd, keybd, event);
|
||||||
event->type = ET_KeyPress;
|
event->type = ET_KeyPress;
|
||||||
event->detail.key = key;
|
event->detail.key = tmpkey;
|
||||||
}
|
}
|
||||||
rg->currentDown = key;
|
rg->currentDown = key;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1266,7 +1266,6 @@ XkbBehaviorText(XkbDescPtr xkb, XkbBehavior * behavior, unsigned format)
|
||||||
}
|
}
|
||||||
else if (type == XkbKB_RadioGroup) {
|
else if (type == XkbKB_RadioGroup) {
|
||||||
int g;
|
int g;
|
||||||
char *tmp;
|
|
||||||
|
|
||||||
g = ((behavior->data) & (~XkbKB_RGAllowNone)) + 1;
|
g = ((behavior->data) & (~XkbKB_RGAllowNone)) + 1;
|
||||||
if (XkbKB_RGAllowNone & behavior->data) {
|
if (XkbKB_RGAllowNone & behavior->data) {
|
||||||
|
|
|
@ -772,8 +772,6 @@ ReadXkmSymbols(FILE * file, XkbDescPtr xkb)
|
||||||
memset((char *) typeName, 0, XkbNumKbdGroups * sizeof(Atom));
|
memset((char *) typeName, 0, XkbNumKbdGroups * sizeof(Atom));
|
||||||
memset((char *) type, 0, XkbNumKbdGroups * sizeof(XkbKeyTypePtr));
|
memset((char *) type, 0, XkbNumKbdGroups * sizeof(XkbKeyTypePtr));
|
||||||
if (wireMap.flags & XkmKeyHasTypes) {
|
if (wireMap.flags & XkmKeyHasTypes) {
|
||||||
register int g;
|
|
||||||
|
|
||||||
for (g = 0; g < XkbNumKbdGroups; g++) {
|
for (g = 0; g < XkbNumKbdGroups; g++) {
|
||||||
if ((wireMap.flags & (1 << g)) &&
|
if ((wireMap.flags & (1 << g)) &&
|
||||||
((tmp = XkmGetCountedString(file, buf, 100)) > 0)) {
|
((tmp = XkmGetCountedString(file, buf, 100)) > 0)) {
|
||||||
|
|
Loading…
Reference in New Issue