Hello all,
Please find attached a trivial patch making a few arrays const (in addition to the data they point to).
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f553523857..aafc7187b0 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -769,7 +769,7 @@ typedef enum } XLogSource; /* human-readable names for XLogSources, for debugging output */ -static const char *xlogSourceNames[] = {"any", "archive", "pg_wal", "stream"}; +static const char *const xlogSourceNames[] = {"any", "archive", "pg_wal", "stream"}; /* * openLogFile is -1 or a kernel FD for an open log file segment. diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index d5f9b617c8..0bba32cde5 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -119,7 +119,7 @@ static bool noverify_checksums = false; * Note: this list should be kept in sync with the filter lists in pg_rewind's * filemap.c. */ -static const char *excludeDirContents[] = +static const char *const excludeDirContents[] = { /* * Skip temporary statistics files. PG_STAT_TMP_DIR must be skipped even @@ -160,7 +160,7 @@ static const char *excludeDirContents[] = /* * List of files excluded from backups. */ -static const char *excludeFiles[] = +static const char *const excludeFiles[] = { /* Skip auto conf temporary file. */ PG_AUTOCONF_FILENAME ".tmp",