summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorPeter Eisentraut2017-04-11 18:13:31 +0000
committerPeter Eisentraut2017-04-17 17:59:46 +0000
commit6275f5d28a1577563f53f2171689d4f890a46881 (patch)
tree5195747800c596ab9151a86a322a7698d0bec393 /src/backend/utils/cache/relcache.c
parent0e8286d354520cd8b8ac5e7a963130769f731476 (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/relcache.c')
-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 ddb948528b3..5bf02d4c0e6 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -6074,7 +6074,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
@@ -6116,7 +6116,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);