mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 21:33:53 -06:00
plugins: fix -Werror=maybe-uninitialized false-positive
../contrib/plugins/cache.c:638:9: error: ‘l2_cache’ may be used uninitialized [-Werror=maybe-uninitialized] 638 | append_stats_line(rep, l1_dmem_accesses, l1_dmisses, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Is a false-positive, since cores > 1, so the variable is set in the above loop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
This commit is contained in:
parent
5b4109232e
commit
c0fb8e88cb
1 changed files with 1 additions and 1 deletions
|
@ -603,7 +603,7 @@ static int l2_cmp(gconstpointer a, gconstpointer b)
|
|||
static void log_stats(void)
|
||||
{
|
||||
int i;
|
||||
Cache *icache, *dcache, *l2_cache;
|
||||
Cache *icache, *dcache, *l2_cache = NULL;
|
||||
|
||||
g_autoptr(GString) rep = g_string_new("core #, data accesses, data misses,"
|
||||
" dmiss rate, insn accesses,"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue