Commit f0af82cb authored by Mike Gabriel's avatar Mike Gabriel

nx-X11/lib/X11/XKBMisc.c: Avoid warning about maybe non-assigned variables (mask, newMask).

parent d60297e4
...@@ -834,7 +834,7 @@ XkbUpdateKeyTypeVirtualMods( XkbDescPtr xkb, ...@@ -834,7 +834,7 @@ XkbUpdateKeyTypeVirtualMods( XkbDescPtr xkb,
XkbChangesPtr changes) XkbChangesPtr changes)
{ {
register unsigned int i; register unsigned int i;
unsigned int mask; unsigned int mask = 0;
XkbVirtualModsToReal(xkb,type->mods.vmods,&mask); XkbVirtualModsToReal(xkb,type->mods.vmods,&mask);
type->mods.mask= type->mods.real_mods|mask; type->mods.mask= type->mods.real_mods|mask;
...@@ -888,7 +888,7 @@ unsigned int checkState = 0; ...@@ -888,7 +888,7 @@ unsigned int checkState = 0;
XkbUpdateKeyTypeVirtualMods(xkb,&xkb->map->types[i],changed,changes); XkbUpdateKeyTypeVirtualMods(xkb,&xkb->map->types[i],changed,changes);
} }
if (changed&xkb->ctrls->internal.vmods) { if (changed&xkb->ctrls->internal.vmods) {
unsigned int newMask; unsigned int newMask = 0;
XkbVirtualModsToReal(xkb,xkb->ctrls->internal.vmods,&newMask); XkbVirtualModsToReal(xkb,xkb->ctrls->internal.vmods,&newMask);
newMask|= xkb->ctrls->internal.real_mods; newMask|= xkb->ctrls->internal.real_mods;
if (xkb->ctrls->internal.mask!=newMask) { if (xkb->ctrls->internal.mask!=newMask) {
...@@ -900,7 +900,7 @@ unsigned int checkState = 0; ...@@ -900,7 +900,7 @@ unsigned int checkState = 0;
} }
} }
if (changed&xkb->ctrls->ignore_lock.vmods) { if (changed&xkb->ctrls->ignore_lock.vmods) {
unsigned int newMask; unsigned int newMask = 0;
XkbVirtualModsToReal(xkb,xkb->ctrls->ignore_lock.vmods,&newMask); XkbVirtualModsToReal(xkb,xkb->ctrls->ignore_lock.vmods,&newMask);
newMask|= xkb->ctrls->ignore_lock.real_mods; newMask|= xkb->ctrls->ignore_lock.real_mods;
if (xkb->ctrls->ignore_lock.mask!=newMask) { if (xkb->ctrls->ignore_lock.mask!=newMask) {
...@@ -916,7 +916,7 @@ unsigned int checkState = 0; ...@@ -916,7 +916,7 @@ unsigned int checkState = 0;
map= &xkb->indicators->maps[0]; map= &xkb->indicators->maps[0];
for (i=0;i<XkbNumIndicators;i++,map++) { for (i=0;i<XkbNumIndicators;i++,map++) {
if (map->mods.vmods&changed) { if (map->mods.vmods&changed) {
unsigned int newMask; unsigned int newMask = 0;
XkbVirtualModsToReal(xkb,map->mods.vmods,&newMask); XkbVirtualModsToReal(xkb,map->mods.vmods,&newMask);
newMask|= map->mods.real_mods; newMask|= map->mods.real_mods;
if (newMask!=map->mods.mask) { if (newMask!=map->mods.mask) {
...@@ -933,7 +933,7 @@ unsigned int checkState = 0; ...@@ -933,7 +933,7 @@ unsigned int checkState = 0;
XkbCompatMapPtr compat; XkbCompatMapPtr compat;
compat= xkb->compat; compat= xkb->compat;
for (i=0;i<XkbNumKbdGroups;i++) { for (i=0;i<XkbNumKbdGroups;i++) {
unsigned int newMask; unsigned int newMask = 0;
XkbVirtualModsToReal(xkb,compat->groups[i].vmods,&newMask); XkbVirtualModsToReal(xkb,compat->groups[i].vmods,&newMask);
newMask|= compat->groups[i].real_mods; newMask|= compat->groups[i].real_mods;
if (compat->groups[i].mask!=newMask) { if (compat->groups[i].mask!=newMask) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment