From 47b4913050a320bfba55fa65d52d9ba15488bc70 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 11 Apr 2017 14:13:31 -0400 Subject: 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. --- src/backend/utils/cache/relcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/cache') diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 8c8ef66c8f4..95ff838ceaf 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -5525,7 +5525,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 @@ -5567,7 +5567,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); -- cgit v1.2.3