From 223975ada0bdb87ea20813378e760b10741b45a0 Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Tue, 23 Oct 2018 14:37:35 -0400 Subject: [PATCH] tcg: fix use of uninitialized variable under CONFIG_PROFILER We forgot to initialize n in commit 15fa08f845 ("tcg: Dynamically allocate TCGOps", 2017-12-29). Backports commit c1f543b739086733024e31d74a52d9e41553f316 from qemu --- qemu/tcg/tcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/tcg/tcg.c b/qemu/tcg/tcg.c index bb894947..0942b049 100644 --- a/qemu/tcg/tcg.c +++ b/qemu/tcg/tcg.c @@ -2890,7 +2890,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) #ifdef CONFIG_PROFILER { - int n; + int n = 0; QTAILQ_FOREACH(op, &s->ops, link) { n++;