In the if-else-if-else-if in loop in the end device the first two tests are exhaustive so the third arm can never happen.