xkbcomp: Silence warning of return of uninitialised value
authorRob Bradford <rob@linux.intel.com>
Thu, 5 Jan 2012 14:20:35 +0000 (14:20 +0000)
committerRob Bradford <rob@linux.intel.com>
Thu, 5 Jan 2012 14:24:11 +0000 (14:24 +0000)
Some routes through HandleGeometryVar do not set a return value. Set a default
value for the return variable to avoid returning an uninitialised value.

src/xkbcomp/geometry.c

index ae3f6bc..7dde6f8 100644 (file)
@@ -2119,7 +2119,7 @@ HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
     ExprDef *ndx;
     DoodadInfo *di;
     uint32_t *pField = NULL;
-    int ret;
+    int ret = True; /* default to no error */
 
     if (ExprResolveLhs(stmt->name, &elem, &field, &ndx) == 0)
         return 0;               /* internal error, already reported */