Attempt to fix some compiler warnings.

This commit is contained in:
Robert Haas 2015-04-29 14:02:01 -04:00
parent eb010637dd
commit ef3f9e642d
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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));