Commit 615291f1f448ceafef778c9336d81617d9e32dd2

Rob Bradford 2012-01-05T14:20:35

xkbcomp: Silence warning of return of uninitialised value Some routes through HandleGeometryVar do not set a return value. Set a default value for the return variable to avoid returning an uninitialised value.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/xkbcomp/geometry.c b/src/xkbcomp/geometry.c
index ae3f6bc..7dde6f8 100644
--- a/src/xkbcomp/geometry.c
+++ b/src/xkbcomp/geometry.c
@@ -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 */