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@xxxxxxxxxx> --- src/cyclictest/cyclictest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 45b6041ec1c9..542e85c27a25 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -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; -- 2.20.1