mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +03:00
Fix new warnings from GCC 7
This addresses the new warning types -Wformat-truncation -Wformat-overflow that are part of -Wall, via -Wformat, in GCC 7.
This commit is contained in:
@@ -166,7 +166,7 @@ walkdir(const char *path,
|
||||
|
||||
while (errno = 0, (de = readdir(dir)) != NULL)
|
||||
{
|
||||
char subpath[MAXPGPATH];
|
||||
char subpath[MAXPGPATH * 2];
|
||||
struct stat fst;
|
||||
int sret;
|
||||
|
||||
@@ -174,7 +174,7 @@ walkdir(const char *path,
|
||||
strcmp(de->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
snprintf(subpath, MAXPGPATH, "%s/%s", path, de->d_name);
|
||||
snprintf(subpath, sizeof(subpath), "%s/%s", path, de->d_name);
|
||||
|
||||
if (process_symlinks)
|
||||
sret = stat(subpath, &fst);
|
||||
|
Reference in New Issue
Block a user