Commit 101720a2bc106288d6ca2c2ceb5bec41742b8d8d

Ran Benita 2014-01-12T13:18:39

parser: shutup some 'may be used uninitialized' warnings Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y
index f846724..20ece28 100644
--- a/src/xkbcomp/parser.y
+++ b/src/xkbcomp/parser.y
@@ -760,12 +760,12 @@ MapName         :       STRING  { $$ = $1; }
 XkbFile *
 parse(struct xkb_context *ctx, void *scanner, const char *map)
 {
-    struct parser_param param;
     int ret;
     XkbFile *first = NULL;
-
-    param.scanner = scanner;
-    param.ctx = ctx;
+    struct parser_param param = {
+        .scanner = scanner,
+        .ctx = ctx,
+    };
 
     /*
      * If we got a specific map, we look for it exclusively and return