diff options
author | Pierrick Bouvier <pierrick.bouvier@linaro.org> | 2024-10-23 14:28:10 -0700 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-11-05 09:13:51 +0000 |
commit | 6d630d84ca551840ae4ce629d6adfc2fe97e741a (patch) | |
tree | 827d21e9504a4194c513fa198760986961875d87 | |
parent | daaf51001a13da007d7dde72e1ed3b06bc490791 (diff) | |
download | qemu-6d630d84ca551840ae4ce629d6adfc2fe97e741a.zip qemu-6d630d84ca551840ae4ce629d6adfc2fe97e741a.tar.gz qemu-6d630d84ca551840ae4ce629d6adfc2fe97e741a.tar.bz2 |
contrib/plugins/cflow: fix warning
contrib/plugins/cflow.c: In function ‘plugin_exit’:
contrib/plugins/cflow.c:167:19: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local]
167 | NodeData *n = l->data;
| ^
contrib/plugins/cflow.c:139:9: note: shadowed declaration is here
139 | int n = 0;
| ^
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20241023212812.1376972-2-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
-rw-r--r-- | contrib/plugins/cflow.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index 6faa55d..b39974d 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -136,7 +136,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_autoptr(GString) result = g_string_new("collected "); GList *data; GCompareFunc sort = &hottest; - int n = 0; + int i = 0; g_mutex_lock(&node_lock); g_string_append_printf(result, "%d control flow nodes in the hash table\n", @@ -162,8 +162,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) data = g_list_sort(data, sort); for (GList *l = data; - l != NULL && n < topn; - l = l->next, n++) { + l != NULL && i < topn; + l = l->next, i++) { NodeData *n = l->data; const char *type = n->mid_count ? "sync fault" : "branch"; g_string_append_printf(result, " addr: 0x%"PRIx64 " %s: %s (%s)\n", |