mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Fix shadowed declaration
Since b5934bfd6071 in postgresql.git the flag `-Wshadow=compatible-local` is activated. This commit fixes any duplicated declaration made in the same function. References: HL-40
This commit is contained in:
committed by
Mario Gonzalez
parent
c6d9f38458
commit
a469221e28
@@ -1624,7 +1624,7 @@ get_ready_archive_files(PGconn *conn, const char *data_directory)
|
||||
|
||||
while ((arcdir_ent = readdir(arcdir)) != NULL)
|
||||
{
|
||||
struct stat statbuf;
|
||||
struct stat local_statbuf;
|
||||
char file_path[MAXPGPATH + sizeof(arcdir_ent->d_name)];
|
||||
int basenamelen = 0;
|
||||
|
||||
@@ -1634,7 +1634,7 @@ get_ready_archive_files(PGconn *conn, const char *data_directory)
|
||||
arcdir_ent->d_name);
|
||||
|
||||
/* skip non-files */
|
||||
if (stat(file_path, &statbuf) == 0 && !S_ISREG(statbuf.st_mode))
|
||||
if (stat(file_path, &local_statbuf) == 0 && !S_ISREG(local_statbuf.st_mode))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user