diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-11 14:13:31 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-15 13:31:42 -0400 |
commit | 7fc5615afdda0a1bae21c7d0fc47a376e7a8eda2 (patch) | |
tree | 6fd23fc7ee61f18ac91ce4edaa3738bfac02ee57 /src/backend/utils/cache/relcache.c | |
parent | 2dca50b764d40c8cf4edeaaaf09a3292aeb7026e (diff) | |
download | postgresql-7fc5615afdda0a1bae21c7d0fc47a376e7a8eda2.tar.gz postgresql-7fc5615afdda0a1bae21c7d0fc47a376e7a8eda2.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 6fe3b9b8219..6b9494bda90 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -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); |