From 7db0bb69e7e8bfae58f60f33b0c484510abe98d7 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 13 Oct 2020 07:21:19 +0000 Subject: [PATCH] infect: initialize struct to avoid CLANG_WARNING Using scan-build there is a warning about infect.c:231:17: warning: The left operand of '!=' is a garbage value if (ss->state != 'Z') { which is a false positive as every process will have a 'Status' field, but initializing the structure makes the clang analyzer silent. Signed-off-by: Adrian Reber --- compel/src/lib/infect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c index 5c4c1b18d..4f2402fee 100644 --- a/compel/src/lib/infect.c +++ b/compel/src/lib/infect.c @@ -105,7 +105,7 @@ err_parse: int compel_stop_task(int pid) { int ret; - struct seize_task_status ss; + struct seize_task_status ss = {}; ret = compel_interrupt_task(pid); if (ret == 0)