Remove unneeded assignments and variables
authorRan Benita <ran234@gmail.com>
Fri, 24 Feb 2012 14:00:10 +0000 (16:00 +0200)
committerRan Benita <ran234@gmail.com>
Sat, 25 Feb 2012 09:59:56 +0000 (11:59 +0200)
Signed-off-by: Ran Benita <ran234@gmail.com>
src/geom.c
src/maprules.c
src/xkbcomp/alias.c
src/xkbcomp/geometry.c
src/xkbcomp/keymap.c

index 6dd610f..87b1f78 100644 (file)
@@ -86,7 +86,6 @@ XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, s
     if (!geom || !section || !row)
         return False;
 
-    pos = 0;
     bounds = &row->bounds;
     bzero(bounds, sizeof(struct xkb_bounds));
 
index 3fab183..894f202 100644 (file)
@@ -174,7 +174,6 @@ Bool        endOfFile,spacePending,slashPending,inComment;
                        PR_DEBUG("The '!' legal only at start of line\n");
                        PR_DEBUG("Line containing '!' ignored\n");
                        line->num_line= 0;
-                       inComment= 0;
                        break;
                    }
 
@@ -521,7 +520,6 @@ squeeze_spaces(char *p1)
 static Bool
 MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs)
 {
-
    bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec));
    mdefs->model = defs->model;
    mdefs->options = _XkbDupString(defs->options);
index 79c1263..fa27102 100644 (file)
@@ -230,7 +230,6 @@ ApplyAliases(struct xkb_desc * xkb, Bool toGeom, AliasInfo ** info_in)
         *info_in = NULL;
         return True;
     }
-    status = Success;
     if (toGeom)
     {
         if (!xkb->geom)
index 8e425a1..ddb2765 100644 (file)
@@ -565,8 +565,6 @@ DupSectionInfo(SectionInfo * into, SectionInfo * from, GeometryInfo * info)
 
     defs = into->defs;
     *into = *from;
-    into->defs.fileID = defs.fileID;
-    into->defs.merge = defs.merge;
     into->defs.next = NULL;
     into->dfltRow.defs.fileID = defs.fileID;
     into->dfltRow.defs.merge = defs.merge;
@@ -1879,7 +1877,6 @@ SetSectionField(SectionInfo * si,
     ExprResult tmp;
 
     pField = NULL;
-    def = 0;
     if (uStrCaseCmp(field, "priority") == 0)
     {
         if (arrayNdx != NULL)
@@ -2601,10 +2598,8 @@ HandleOverlayDef(OverlayDef * def,
 static Bool
 HandleComplexKey(KeyDef * def, KeyInfo * key, GeometryInfo * info)
 {
-    RowInfo *row;
     ExprDef *expr;
 
-    row = key->row;
     for (expr = def->expr; expr != NULL; expr = (ExprDef *) expr->common.next)
     {
         if (expr->op == OpAssign)
@@ -2636,6 +2631,7 @@ HandleComplexKey(KeyDef * def, KeyInfo * key, GeometryInfo * info)
         }
         else
         {
+            RowInfo *row = key->row;
             switch (expr->type)
             {
             case TypeInt:
index 2c2420d..16e0dfa 100644 (file)
@@ -172,7 +172,7 @@ CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
         }
         ACTION("Description of %s not compiled\n",
                 XkbcConfigText(mainType));
-        ok = False;
+        return False;
     }
     ok = BindIndicators(xkb, True, unbound, NULL);
     return ok;