Skip to content

Commit

Permalink
util/cutils: Clean up global variable shadowing in get_relocated_path()
Browse files Browse the repository at this point in the history
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>
Message-ID: <20231004120019.93101-12-philmd@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
philmd authored and Markus Armbruster committed Oct 6, 2023
1 parent 21eb752 commit 5bebe03
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion util/cutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5bebe03

Please sign in to comment.