From 3ae2ad59d290400a5408069c2adf863a51f2099a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 28 Apr 2024 09:59:25 +0200 Subject: [PATCH] module-rt: fix compiler warning Fix warning about min/max potentially not being initialized. --- src/modules/module-rt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/module-rt.c b/src/modules/module-rt.c index d9ff90201..e9cecf0b7 100644 --- a/src/modules/module-rt.c +++ b/src/modules/module-rt.c @@ -524,6 +524,7 @@ static bool check_realtime_privileges(struct impl *impl) pw_log_warn("Failed to check RLIMIT_RTPRIO: %s", strerror(err)); break; } + min = max = 0; if ((err = get_rt_priority_range(&min, &max)) < 0) { pw_log_warn("Failed to get priority range: %s", strerror(err)); break; @@ -647,6 +648,7 @@ static int acquire_rt_sched(struct spa_thread *thread, int priority) struct sched_param sp; pthread_t pt = (pthread_t)thread; + min = max = 0; if ((err = get_rt_priority_range(&min, &max)) < 0) return err;