1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +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 2dca50b764
commit 7fc5615afd
21 changed files with 60 additions and 60 deletions

View File

@@ -5160,7 +5160,7 @@ RelationCacheInitFileRemove(void)
const char *tblspcdir = "pg_tblspc";
DIR *dir;
struct dirent *de;
char path[MAXPGPATH];
char path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY)];
/*
* We zap the shared cache file too. In theory it can't get out of sync
@@ -5202,7 +5202,7 @@ RelationCacheInitFileRemoveInDir(const char *tblspcpath)
{
DIR *dir;
struct dirent *de;
char initfilename[MAXPGPATH];
char initfilename[MAXPGPATH * 2];
/* Scan the tablespace directory to find per-database directories */
dir = AllocateDir(tblspcpath);