mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
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.
This commit is contained in:
@ -1868,7 +1868,7 @@ CheckPointSnapBuild(void)
|
||||
XLogRecPtr redo;
|
||||
DIR *snap_dir;
|
||||
struct dirent *snap_de;
|
||||
char path[MAXPGPATH];
|
||||
char path[MAXPGPATH + 21];
|
||||
|
||||
/*
|
||||
* We start off with a minimum of the last redo pointer. No new replication
|
||||
@ -1895,7 +1895,7 @@ CheckPointSnapBuild(void)
|
||||
strcmp(snap_de->d_name, "..") == 0)
|
||||
continue;
|
||||
|
||||
snprintf(path, MAXPGPATH, "pg_logical/snapshots/%s", snap_de->d_name);
|
||||
snprintf(path, sizeof(path), "pg_logical/snapshots/%s", snap_de->d_name);
|
||||
|
||||
if (lstat(path, &statbuf) == 0 && !S_ISREG(statbuf.st_mode))
|
||||
{
|
||||
|
Reference in New Issue
Block a user