Content-Length: 305478 | pFad | http://github.com/postgrespro/postgres/commit/ef3f9e642d2b2bba8933b4cff4039ce0d354ce08

00 Attempt to fix some compiler warnings. · postgrespro/postgres@ef3f9e6 · GitHub
Skip to content

Commit ef3f9e6

Browse files
committed
Attempt to fix some compiler warnings.
1 parent eb01063 commit ef3f9e6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,7 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col
25072507
s += strlen(s);
25082508
if (tm->tm_gmtoff % SECS_PER_HOUR != 0)
25092509
{
2510-
sprintf(s, ":%02ld", abs(tm->tm_gmtoff % SECS_PER_HOUR) / SECS_PER_MINUTE);
2510+
sprintf(s, ":%02d", abs(tm->tm_gmtoff % SECS_PER_HOUR) / SECS_PER_MINUTE);
25112511
s += strlen(s);
25122512
}
25132513
break;

src/backend/utils/fmgr/funcapi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,6 @@ get_func_trftypes(HeapTuple procTup,
887887
Oid **p_trftypes)
888888
{
889889

890-
Form_pg_proc procStruct = (Form_pg_proc) GETSTRUCT(procTup);
891890
Datum protrftypes;
892891
ArrayType *arr;
893892
int nelems;
@@ -911,7 +910,7 @@ get_func_trftypes(HeapTuple procTup,
911910
ARR_HASNULL(arr) ||
912911
ARR_ELEMTYPE(arr) != OIDOID)
913912
elog(ERROR, "protrftypes is not a 1-D Oid array");
914-
Assert(nelems >= procStruct->pronargs);
913+
Assert(nelems >= ((Form_pg_proc) GETSTRUCT(procTup))->pronargs);
915914
*p_trftypes = (Oid *) palloc(nelems * sizeof(Oid));
916915
memcpy(*p_trftypes, ARR_DATA_PTR(arr),
917916
nelems * sizeof(Oid));

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ef3f9e642d2b2bba8933b4cff4039ce0d354ce08

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy