From 6a6453fb56a5b5ba3d5a278b51c85bd0bd7dea55 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Mon, 15 Apr 2019 11:19:31 +0200 Subject: [PATCH] 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 --- examples/domtop/domtop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/domtop/domtop.c b/examples/domtop/domtop.c index c9b51aed51..e463e2873f 100644 --- a/examples/domtop/domtop.c +++ b/examples/domtop/domtop.c @@ -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 */