From 42bacc399ba799c840a3be6986b3008ece2561d7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 23 Feb 2022 02:39:17 -0800 Subject: Fix an unused parameter warning ... when either pthread_setschedparam or RTKit aren't available. --- core/helpers.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/helpers.cpp') diff --git a/core/helpers.cpp b/core/helpers.cpp index 754e66c1..e4a94fe5 100644 --- a/core/helpers.cpp +++ b/core/helpers.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include "almalloc.h" #include "alfstream.h" @@ -432,8 +433,11 @@ bool SetRTPriorityPthread(int prio) #endif err = pthread_setschedparam(pthread_self(), SCHED_RR, ¶m); if(err == 0) return true; -#endif +#else + + std::ignore = prio; +#endif WARN("pthread_setschedparam failed: %s (%d)\n", std::strerror(err), err); return false; } @@ -531,6 +535,7 @@ bool SetRTPriorityRTKit(int prio) #else + std::ignore = prio; WARN("D-Bus not supported\n"); #endif return false; -- cgit v1.2.3