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:
@ -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)
|
||||
|
Reference in New Issue
Block a user