From 2dd66866e3e07c2cebeaa1713bc310c98d5027e7 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Mon, 29 Dec 2025 14:13:05 +0000 Subject: [PATCH] zdtm/cgroup_stray: fix uninitialized variable 51.04 DEP cgroup_stray.d 51.07 CC cgroup_stray.o 51.11 cgroup_stray.c:164:18: error: variable 'c' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer] 51.11 164 | if (write(sk, &c, 1) != 1) { 51.11 | ^ 51.11 1 error generated. 51.12 make[1]: *** [../Makefile.inc:96: cgroup_stray.o] Error 1 51.12 make[1]: Leaving directory '/criu/test/zdtm/static' 51.12 make: *** [Makefile:7: static] Error 2 Signed-off-by: Radostin Stoyanov --- test/zdtm/static/cgroup_stray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/zdtm/static/cgroup_stray.c b/test/zdtm/static/cgroup_stray.c index 0c0ed93cf..f5754410f 100644 --- a/test/zdtm/static/cgroup_stray.c +++ b/test/zdtm/static/cgroup_stray.c @@ -135,7 +135,7 @@ out: int main(int argc, char **argv) { int ret = -1, sk_pair[2], sk, status; - char path[PATH_MAX], c; + char path[PATH_MAX], c = 0; pid_t pid = 0; test_init(argc, argv);