rt-tests: cyclictest: Fix warning: ‘cpu’ may be used uninitialized
Fix warning 'cpu' maybe uninitialized by giving it a default value in the switch statement. Note, this is a false positive, but documenting the default value in the switch statement isn't a bad thing. Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
e257955f45
commit
558b1c2760
|
@ -1897,6 +1897,7 @@ int main(int argc, char **argv)
|
|||
printf("Thread %d using cpu %d.\n", i, cpu);
|
||||
break;
|
||||
case AFFINITY_USEALL: cpu = i % max_cpus; break;
|
||||
default: cpu = -1;
|
||||
}
|
||||
|
||||
node = -1;
|
||||
|
|
Loading…
Reference in New Issue