summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache
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-05-16 08:43:55 -0400
commit14605156180a424ba519e7058e34af51d641bffd (patch)
tree0a52fb7e530aa1a91a6c1ae1ac8f25343d3ec8cf /src/backend/utils/cache
parentce80240a7d3a0732cf36fe5068e5899a89c1f7ff (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/utils/cache')
-rw-r--r--src/backend/utils/cache/relcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index eede904f506..4ebe103c1ad 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -5306,7 +5306,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
@@ -5348,7 +5348,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);