[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 11/16] util/cutils: Clean up global variable shadowing in get_
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 11/16] util/cutils: Clean up global variable shadowing in get_relocated_path() |
Date: |
Wed, 4 Oct 2023 14:00:14 +0200 |
Fix:
util/cutils.c:1147:17: error: declaration shadows a variable in the global
scope [-Werror,-Wshadow]
const char *exec_dir = qemu_get_exec_dir();
^
util/cutils.c:1035:20: note: previous declaration is here
static const char *exec_dir;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
util/cutils.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/util/cutils.c b/util/cutils.c
index 25373198ad..b44718a6a2 100644
--- a/util/cutils.c
+++ b/util/cutils.c
@@ -1144,7 +1144,6 @@ char *get_relocated_path(const char *dir)
{
size_t prefix_len = strlen(CONFIG_PREFIX);
const char *bindir = CONFIG_BINDIR;
- const char *exec_dir = qemu_get_exec_dir();
GString *result;
int len_dir, len_bindir;
--
2.41.0
- [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 01/16] hw/audio/soundhw: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 02/16] hw/ide/ahci: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 05/16] plugins/loader: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 08/16] qom/object_interfaces: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 04/16] os-posix: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 11/16] util/cutils: Clean up global variable shadowing in get_relocated_path(),
Philippe Mathieu-Daudé <=
- [PATCH v3 03/16] net/net: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 09/16] semihosting: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 07/16] qemu-io: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 13/16] semihosting/arm-compat: Clean up local variable shadowing, Philippe Mathieu-Daudé, 2023/10/04