From: "Emilio G. Cota" <cota@braap.org>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>
Subject: [Qemu-devel] [PATCH 2/4] tcg: fix use of uninitialized variable under CONFIG_PROFILER
Date: Wed, 10 Oct 2018 10:48:51 -0400 [thread overview]
Message-ID: <20181010144853.13005-3-cota@braap.org> (raw)
In-Reply-To: <20181010144853.13005-1-cota@braap.org>
We forgot to initialize n in commit 15fa08f845 ("tcg: Dynamically
allocate TCGOps", 2017-12-29).
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
tcg/tcg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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++;
--
2.17.1
next prev parent reply other threads:[~2018-10-10 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 14:48 [Qemu-devel] [PATCH 0/4] some TCG fixes Emilio G. Cota
2018-10-10 14:48 ` [Qemu-devel] [PATCH 1/4] tcg: access cpu->icount_decr.u16.high with atomics Emilio G. Cota
2018-10-10 14:48 ` Emilio G. Cota [this message]
2018-10-10 15:14 ` [Qemu-devel] [PATCH 2/4] tcg: fix use of uninitialized variable under CONFIG_PROFILER Philippe Mathieu-Daudé
2018-10-10 14:48 ` [Qemu-devel] [PATCH 3/4] tcg: plug holes in struct TCGProfile Emilio G. Cota
2018-10-10 14:48 ` [Qemu-devel] [PATCH 4/4] tcg: distribute tcg_time into TCG contexts Emilio G. Cota
2018-10-11 22:00 ` [Qemu-devel] [PATCH 0/4] some TCG fixes Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181010144853.13005-3-cota@braap.org \
--to=cota@braap.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).