diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-11 14:13:31 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-16 08:52:39 -0400 |
commit | 47b4913050a320bfba55fa65d52d9ba15488bc70 (patch) | |
tree | 7b97d0a03104a21e0df8911cda102113982632d5 /src/backend/replication/logical/snapbuild.c | |
parent | 21c2c3d75e888a578176616aa1411552f43b4908 (diff) |
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.
Diffstat (limited to 'src/backend/replication/logical/snapbuild.c')
-rw-r--r-- | src/backend/replication/logical/snapbuild.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index 536f7620ced..43ec8e49439 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -1831,7 +1831,7 @@ CheckPointSnapBuild(void) XLogRecPtr redo; DIR *snap_dir; struct dirent *snap_de; - char path[MAXPGPATH]; + char path[MAXPGPATH + 21]; /* * We start of with a minimum of the last redo pointer. No new replication @@ -1858,7 +1858,7 @@ CheckPointSnapBuild(void) strcmp(snap_de->d_name, "..") == 0) continue; - snprintf(path, MAXPGPATH, "pg_logical/snapshots/%s", snap_de->d_name); + snprintf(path, sizeof(path), "pg_logical/snapshots/%s", snap_de->d_name); if (lstat(path, &statbuf) == 0 && !S_ISREG(statbuf.st_mode)) { |