From 805684585e5f6f4d7253ec0834af2f78f1f0288c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 21 Mar 2015 19:37:30 +0100 Subject: [PATCH] check: Fix uninitialized variable compiler warning with gcc check_run.c: In function 'sig_handler': check_run.c:127:13: warning: 'child_sig' may be used uninitialized in this function [-Wmaybe-uninitialized] killpg(group_pid, child_sig); ^ check_run.c:130:31: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized] sigaction(sig_nr, &old_action[idx], NULL); ^ --- libs/gst/check/libcheck/check_run.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/gst/check/libcheck/check_run.c b/libs/gst/check/libcheck/check_run.c index c8a6817..38d2cf6 100644 --- a/libs/gst/check/libcheck/check_run.c +++ b/libs/gst/check/libcheck/check_run.c @@ -116,7 +116,8 @@ sig_handler (int sig_nr) if (sig_nr == SIGINT) { idx = 1; child_sig = SIGKILL; - } else if (sig_nr == SIGTERM) { + } else { /* if (sig_nr == SIGTERM) */ + idx = 2; child_sig = SIGTERM; } -- 2.7.4