From: Karel Zak Date: Tue, 20 Feb 2018 09:40:22 +0000 (+0100) Subject: chrt: fix compiler warning [-Wmaybe-uninitialized] X-Git-Tag: v2.32-rc2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=685f544918e4287abea4a04c69502df5b17d4f36;p=thirdparty%2Futil-linux.git chrt: fix compiler warning [-Wmaybe-uninitialized] Signed-off-by: Karel Zak --- diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 3d21c43870..b08c78ed8a 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -207,7 +207,7 @@ static const char *get_policy_name(int policy) static void show_sched_pid_info(struct chrt_ctl *ctl, pid_t pid) { - int policy, reset_on_fork = 0, prio = 0; + int policy = -1, reset_on_fork = 0, prio = 0; #ifdef SCHED_DEADLINE uint64_t deadline = 0, runtime = 0, period = 0; #endif