Skip to content

Commit 6e5558f

Browse files
Add a default case
1 parent fb4bd64 commit 6e5558f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/util/ThreadPriority.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ void set_priority(const NUClear::PriorityLevel& priority) {
6363
case NUClear::PriorityLevel::IDLE: pthread_setschedparam(pthread_self(), SCHED_IDLE, &param); break;
6464
case NUClear::PriorityLevel::LOWEST:
6565
case NUClear::PriorityLevel::LOW: pthread_setschedparam(pthread_self(), SCHED_OTHER, &param); break;
66+
default: // Default to normal if someone broke the enum
6667
case NUClear::PriorityLevel::NORMAL:
6768
param.sched_priority = min_rr_priority;
6869
pthread_setschedparam(pthread_self(), SCHED_RR, &param); // Min realtime beats all non-realtime

0 commit comments

Comments
 (0)