aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/basebackup.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-04-11 14:13:31 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-04-17 13:59:46 -0400
commit6275f5d28a1577563f53f2171689d4f890a46881 (patch)
tree5195747800c596ab9151a86a322a7698d0bec393 /src/backend/replication/basebackup.c
parent0e8286d354520cd8b8ac5e7a963130769f731476 (diff)
downloadpostgresql-6275f5d28a1577563f53f2171689d4f890a46881.tar.gz
postgresql-6275f5d28a1577563f53f2171689d4f890a46881.zip
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/basebackup.c')
-rw-r--r--src/backend/replication/basebackup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index e3a7ad5e9ab..3ee0dd5aa45 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -959,7 +959,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces,
{
DIR *dir;
struct dirent *de;
- char pathbuf[MAXPGPATH];
+ char pathbuf[MAXPGPATH * 2];
struct stat statbuf;
int64 size = 0;
@@ -1011,7 +1011,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces,
if (excludeFound)
continue;
- snprintf(pathbuf, MAXPGPATH, "%s/%s", path, de->d_name);
+ snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, de->d_name);
/* Skip pg_control here to back up it last */
if (strcmp(pathbuf, "./global/pg_control") == 0)