examples: Initialize @pos in domtop.c

This is a zero-cost workaround for a bug in GCC 8.3.0 which causes the
compilation to fail, because the compiler thinks that the value might be used
uninitialized even though it clearly cannot be.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2019-04-15 11:19:31 +02:00
parent 9d7b9cf166
commit 6a6453fb56

View File

@ -206,7 +206,7 @@ print_cpu_usage(size_t cpu,
}
for (i = 0; i < ncpus; i++) {
size_t pos;
size_t pos = 0;
double usage;
/* check if the vCPU is in the maps */