Make ecpg's rjulmdy() and rmdyjul() agree with their declarations.
authorTom Lane <[email protected]>
Thu, 28 Jan 2021 16:17:13 +0000 (11:17 -0500)
committerTom Lane <[email protected]>
Thu, 28 Jan 2021 16:17:13 +0000 (11:17 -0500)
We had "short *mdy" in the extern declarations, but "short mdy[3]"
in the actual function definitions.  Per C99 these are equivalent,
but recent versions of gcc have started to issue warnings about
the inconsistency.  Clean it up before the warnings get any more
widespread.

Back-patch, in case anyone wants to build older PG versions with
bleeding-edge compilers.

Discussion: https://postgr.es/m/2401575.1611764534@sss.pgh.pa.us

src/interfaces/ecpg/compatlib/informix.c

index 0bca383ebe573ffb3e00c3edfce8b901a7813be0..dccf39582da55c0cbe246dd1c6bbd80574a8f5bf 100644 (file)
@@ -513,7 +513,7 @@ rtoday(date * d)
 }
 
 int
-rjulmdy(date d, short mdy[3])
+rjulmdy(date d, short *mdy)
 {
    int         mdy_int[3];
 
@@ -564,7 +564,7 @@ rfmtdate(date d, const char *fmt, char *str)
 }
 
 int
-rmdyjul(short mdy[3], date * d)
+rmdyjul(short *mdy, date * d)
 {
    int         mdy_int[3];