mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Attempt to fix some compiler warnings.
This commit is contained in:
parent
eb010637dd
commit
ef3f9e642d
@ -2507,7 +2507,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col
|
||||
s += strlen(s);
|
||||
if (tm->tm_gmtoff % SECS_PER_HOUR != 0)
|
||||
{
|
||||
sprintf(s, ":%02ld", abs(tm->tm_gmtoff % SECS_PER_HOUR) / SECS_PER_MINUTE);
|
||||
sprintf(s, ":%02d", abs(tm->tm_gmtoff % SECS_PER_HOUR) / SECS_PER_MINUTE);
|
||||
s += strlen(s);
|
||||
}
|
||||
break;
|
||||
|
@ -887,7 +887,6 @@ get_func_trftypes(HeapTuple procTup,
|
||||
Oid **p_trftypes)
|
||||
{
|
||||
|
||||
Form_pg_proc procStruct = (Form_pg_proc) GETSTRUCT(procTup);
|
||||
Datum protrftypes;
|
||||
ArrayType *arr;
|
||||
int nelems;
|
||||
@ -911,7 +910,7 @@ get_func_trftypes(HeapTuple procTup,
|
||||
ARR_HASNULL(arr) ||
|
||||
ARR_ELEMTYPE(arr) != OIDOID)
|
||||
elog(ERROR, "protrftypes is not a 1-D Oid array");
|
||||
Assert(nelems >= procStruct->pronargs);
|
||||
Assert(nelems >= ((Form_pg_proc) GETSTRUCT(procTup))->pronargs);
|
||||
*p_trftypes = (Oid *) palloc(nelems * sizeof(Oid));
|
||||
memcpy(*p_trftypes, ARR_DATA_PTR(arr),
|
||||
nelems * sizeof(Oid));
|
||||
|
Loading…
Reference in New Issue
Block a user