Broken since
6f27e449. We could not enter the fallback
if HAVE_SCHED_SETATTR is not defined.
Two gcc warnings made this issue visible:
schedutils/chrt.c:247:1: warning: label 'fallback' defined but not used [-Wunused-label]
schedutils/chrt.c:266:9: warning: 'policy' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
runtime = sa.sched_runtime;
period = sa.sched_period;
}
-#endif
/*
* Old way
*/
fallback:
- if (errno == ENOSYS) {
+ if (errno == ENOSYS)
+#endif
+ {
struct sched_param sp;
policy = sched_getscheduler(pid);