Commit a350222cc9373cb39f6321aa626ecd7d5066a4fa

Peter Hutterer 2020-09-07T19:47:42

context: fix a compiler warning ../src/context.c:57:9: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/context.c b/src/context.c
index 2abaa9b..4a6ac8e 100644
--- a/src/context.c
+++ b/src/context.c
@@ -50,7 +50,7 @@ XKB_EXPORT int
 xkb_context_include_path_append(struct xkb_context *ctx, const char *path)
 {
     struct stat stat_buf;
-    int err;
+    int err = ENOMEM;
     char *tmp;
 
     tmp = strdup(path);