1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +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:
Peter Eisentraut
2017-04-11 14:13:31 -04:00
parent 0e8286d354
commit 6275f5d28a
23 changed files with 68 additions and 68 deletions

View File

@ -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)