diff options
author | Peter Eisentraut | 2017-04-11 18:13:31 +0000 |
---|---|---|
committer | Peter Eisentraut | 2017-04-17 17:59:46 +0000 |
commit | 6275f5d28a1577563f53f2171689d4f890a46881 (patch) | |
tree | 5195747800c596ab9151a86a322a7698d0bec393 /src/timezone/pgtz.c | |
parent | 0e8286d354520cd8b8ac5e7a963130769f731476 (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/timezone/pgtz.c')
-rw-r--r-- | src/timezone/pgtz.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index 826857d943..b7cfc5f5ac 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -412,7 +412,7 @@ pg_tzenumerate_next(pg_tzenum *dir) while (dir->depth >= 0) { struct dirent *direntry; - char fullname[MAXPGPATH]; + char fullname[MAXPGPATH * 2]; struct stat statbuf; direntry = ReadDir(dir->dirdesc[dir->depth], dir->dirname[dir->depth]); @@ -429,7 +429,7 @@ pg_tzenumerate_next(pg_tzenum *dir) if (direntry->d_name[0] == '.') continue; - snprintf(fullname, MAXPGPATH, "%s/%s", + snprintf(fullname, sizeof(fullname), "%s/%s", dir->dirname[dir->depth], direntry->d_name); if (stat(fullname, &statbuf) != 0) ereport(ERROR, |