Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a843053

Browse files
committed
Suppress compile warnings on machines where the INT64CONST() decoration
is actually needed. Per Oliver Elphick.
1 parent 8b1ae8f commit a843053

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/backend/utils/adt/date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.97 2004/05/21 05:08:01 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.98 2004/05/31 18:53:17 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1461,7 +1461,7 @@ interval_time(PG_FUNCTION_ARGS)
14611461
}
14621462
else if (result < 0)
14631463
{
1464-
days = (-result + INT64CONST(86400000000 - 1)) / INT64CONST(86400000000);
1464+
days = (-result + INT64CONST(86400000000) - 1) / INT64CONST(86400000000);
14651465
result += days * INT64CONST(86400000000);
14661466
}
14671467
#else

src/backend/utils/adt/datetime.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.128 2004/05/21 05:08:01 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.129 2004/05/31 18:53:17 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1209,7 +1209,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
12091209

12101210
tmask |= DTK_TIME_M;
12111211
#ifdef HAVE_INT64_TIMESTAMP
1212-
dt2time((time * 86400000000),
1212+
dt2time((time * INT64CONST(86400000000)),
12131213
&tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
12141214
#else
12151215
dt2time((time * 86400),
@@ -1960,7 +1960,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
19601960

19611961
tmask |= DTK_TIME_M;
19621962
#ifdef HAVE_INT64_TIMESTAMP
1963-
dt2time((time * 86400000000),
1963+
dt2time((time * INT64CONST(86400000000)),
19641964
&tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
19651965
#else
19661966
dt2time((time * 86400),

src/interfaces/ecpg/pgtypeslib/dt_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
22552255

22562256
tmask |= DTK_TIME_M;
22572257
#ifdef HAVE_INT64_TIMESTAMP
2258-
dt2time((time * 86400000000), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
2258+
dt2time((time * INT64CONST(86400000000)), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
22592259
#else
22602260
dt2time((time * 86400), &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
22612261
#endif

0 commit comments

Comments
 (0)