summaryrefslogtreecommitdiffstats
path: root/tcg
diff options
context:
space:
mode:
authorEmilio G. Cota2018-10-10 16:48:51 +0200
committerRichard Henderson2018-10-19 03:58:10 +0200
commitc1f543b739086733024e31d74a52d9e41553f316 (patch)
treeccdfa8d2d2ecafbe418fb8674a888a2bb843f043 /tcg
parenttcg: access cpu->icount_decr.u16.high with atomics (diff)
downloadqemu-c1f543b739086733024e31d74a52d9e41553f316.tar.gz
qemu-c1f543b739086733024e31d74a52d9e41553f316.tar.xz
qemu-c1f543b739086733024e31d74a52d9e41553f316.zip
tcg: fix use of uninitialized variable under CONFIG_PROFILER
We forgot to initialize n in commit 15fa08f845 ("tcg: Dynamically allocate TCGOps", 2017-12-29). Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <20181010144853.13005-3-cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index f27b22bd3c..8f26916b99 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -3430,7 +3430,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
#ifdef CONFIG_PROFILER
{
- int n;
+ int n = 0;
QTAILQ_FOREACH(op, &s->ops, link) {
n++;