aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/file/reinit.c
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-04-17 13:59:46 -0400
commit6275f5d28a1577563f53f2171689d4f890a46881 (patch)
tree5195747800c596ab9151a86a322a7698d0bec393 /src/backend/storage/file/reinit.c
parent0e8286d354520cd8b8ac5e7a963130769f731476 (diff)
downloadpostgresql-6275f5d28a1577563f53f2171689d4f890a46881.tar.gz
postgresql-6275f5d28a1577563f53f2171689d4f890a46881.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/storage/file/reinit.c')
-rw-r--r--src/backend/storage/file/reinit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/storage/file/reinit.c b/src/backend/storage/file/reinit.c
index b883dfc657e..f331e7bc21e 100644
--- a/src/backend/storage/file/reinit.c
+++ b/src/backend/storage/file/reinit.c
@@ -48,7 +48,7 @@ typedef struct
void
ResetUnloggedRelations(int op)
{
- char temp_path[MAXPGPATH];
+ char temp_path[MAXPGPATH + 10 + sizeof(TABLESPACE_VERSION_DIRECTORY)];
DIR *spc_dir;
struct dirent *spc_de;
MemoryContext tmpctx,
@@ -104,7 +104,7 @@ ResetUnloggedRelationsInTablespaceDir(const char *tsdirname, int op)
{
DIR *ts_dir;
struct dirent *de;
- char dbspace_path[MAXPGPATH];
+ char dbspace_path[MAXPGPATH * 2];
ts_dir = AllocateDir(tsdirname);
if (ts_dir == NULL)
@@ -145,7 +145,7 @@ ResetUnloggedRelationsInDbspaceDir(const char *dbspacedirname, int op)
{
DIR *dbspace_dir;
struct dirent *de;
- char rm_path[MAXPGPATH];
+ char rm_path[MAXPGPATH * 2];
/* Caller must specify at least one operation. */
Assert((op & (UNLOGGED_RELATION_CLEANUP | UNLOGGED_RELATION_INIT)) != 0);
@@ -308,7 +308,7 @@ ResetUnloggedRelationsInDbspaceDir(const char *dbspacedirname, int op)
ForkNumber forkNum;
int oidchars;
char oidbuf[OIDCHARS + 1];
- char srcpath[MAXPGPATH];
+ char srcpath[MAXPGPATH * 2];
char dstpath[MAXPGPATH];
/* Skip anything that doesn't look like a relation data file. */