Merge pull request #226 from fmbiete/patch-1
PG-289 - Don't fail to build with C11 compilerspull/234/head
commit
f0af45b3fd
4
guc.c
4
guc.c
|
@ -34,7 +34,7 @@ static bool check_histogram_max(int *newval, void **extra, GucSource source);
|
||||||
void
|
void
|
||||||
init_guc(void)
|
init_guc(void)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0, j;
|
||||||
|
|
||||||
conf[i] = (GucVariable) {
|
conf[i] = (GucVariable) {
|
||||||
.guc_name = "pg_stat_monitor.pgsm_max",
|
.guc_name = "pg_stat_monitor.pgsm_max",
|
||||||
|
@ -191,7 +191,7 @@ init_guc(void)
|
||||||
.guc_unit = 0,
|
.guc_unit = 0,
|
||||||
.guc_value = &PGSM_TRACK
|
.guc_value = &PGSM_TRACK
|
||||||
};
|
};
|
||||||
for (int j = 0; j < conf[i].n_options; ++j) {
|
for (j = 0; j < conf[i].n_options; ++j) {
|
||||||
strlcpy(conf[i].guc_options[j], track_options[j].name, sizeof(conf[i].guc_options[j]));
|
strlcpy(conf[i].guc_options[j], track_options[j].name, sizeof(conf[i].guc_options[j]));
|
||||||
}
|
}
|
||||||
DefineEnumGUC(&conf[i++], track_options);
|
DefineEnumGUC(&conf[i++], track_options);
|
||||||
|
|
|
@ -3399,8 +3399,9 @@ pg_stat_monitor_settings(PG_FUNCTION_ARGS)
|
||||||
|
|
||||||
if (conf->type == PGC_ENUM)
|
if (conf->type == PGC_ENUM)
|
||||||
{
|
{
|
||||||
|
size_t i;
|
||||||
strcat(options, conf->guc_options[0]);
|
strcat(options, conf->guc_options[0]);
|
||||||
for (size_t i = 1; i < conf->n_options; ++i)
|
for (i = 1; i < conf->n_options; ++i)
|
||||||
{
|
{
|
||||||
strcat(options, ", ");
|
strcat(options, ", ");
|
||||||
strcat(options, conf->guc_options[i]);
|
strcat(options, conf->guc_options[i]);
|
||||||
|
|
Loading…
Reference in New Issue