From a7790128481894630414213603d3e894d764f802 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 21 May 2022 11:18:55 +0100 Subject: Fix a new warning on Cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > ../../gdb/windows-nat.c: In function ‘windows_solib* windows_make_so(const char*, LPVOID)’: > ../../gdb/windows-nat.c:714:12: error: declaration of ‘char name [512]’ shadows a parameter [-Werror=shadow=compatible-local] > 714 | char name[SO_NAME_MAX_PATH_SIZE]; > | ^~~~ > ../../gdb/windows-nat.c:655:30: note: shadowed declaration is here > 655 | windows_make_so (const char *name, LPVOID load_addr) > | ~~~~~~~~~~~~^~~~ --- gdb/windows-nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb') diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index b98848b..8631a1b 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -711,10 +711,10 @@ windows_make_so (const char *name, LPVOID load_addr) #else if (buf[0]) { - char name[SO_NAME_MAX_PATH_SIZE]; - cygwin_conv_path (CCP_WIN_W_TO_POSIX, buf, name, + char cname[SO_NAME_MAX_PATH_SIZE]; + cygwin_conv_path (CCP_WIN_W_TO_POSIX, buf, cname, SO_NAME_MAX_PATH_SIZE); - so->name = name; + so->name = cname; } else { -- cgit v1.1