mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 00:02:04 -04:00
Suppress possibly-uninitialized-variable warning seen with older gcc versions.
This commit is contained in:
parent
890a9992ce
commit
beef89567e
@ -2490,7 +2490,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
|
|||||||
volatile PgBackendStatus *beentry = MyBEEntry;
|
volatile PgBackendStatus *beentry = MyBEEntry;
|
||||||
TimestampTz start_timestamp;
|
TimestampTz start_timestamp;
|
||||||
TimestampTz current_timestamp;
|
TimestampTz current_timestamp;
|
||||||
int len;
|
int len = 0;
|
||||||
|
|
||||||
TRACE_POSTGRESQL_STATEMENT_STATUS(cmd_str);
|
TRACE_POSTGRESQL_STATEMENT_STATUS(cmd_str);
|
||||||
|
|
||||||
@ -2524,8 +2524,8 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
|
|||||||
start_timestamp = GetCurrentStatementStartTimestamp();
|
start_timestamp = GetCurrentStatementStartTimestamp();
|
||||||
if (cmd_str != NULL)
|
if (cmd_str != NULL)
|
||||||
{
|
{
|
||||||
len = strlen(cmd_str);
|
len = pg_mbcliplen(cmd_str, strlen(cmd_str),
|
||||||
len = pg_mbcliplen(cmd_str, len, pgstat_track_activity_query_size - 1);
|
pgstat_track_activity_query_size - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user