Skip to content

Commit 8a21411

Browse files
committed
Silence pointless compiler warnings
1 parent c327913 commit 8a21411

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bson/time64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ struct TM *gmtime64_r (const Time64_T *in_time, struct TM *p)
543543

544544
assert(p != NULL);
545545

546+
#ifdef USE_SYSTEM_GMTIME
546547
/* Use the system gmtime() if time_t is small enough */
547548
if( SHOULD_USE_SYSTEM_GMTIME(*in_time) ) {
548549
time_t safe_time = (time_t)*in_time;
@@ -554,6 +555,7 @@ struct TM *gmtime64_r (const Time64_T *in_time, struct TM *p)
554555

555556
return p;
556557
}
558+
#endif
557559

558560
#ifdef HAS_TM_TM_GMTOFF
559561
p->tm_gmtoff = 0;
@@ -668,6 +670,7 @@ struct TM *localtime64_r (const Time64_T *time, struct TM *local_tm)
668670

669671
assert(local_tm != NULL);
670672

673+
#ifdef USE_SYSTEM_LOCALTIME
671674
/* Use the system localtime() if time_t is small enough */
672675
if( SHOULD_USE_SYSTEM_LOCALTIME(*time) ) {
673676
safe_time = (time_t)*time;
@@ -681,6 +684,7 @@ struct TM *localtime64_r (const Time64_T *time, struct TM *local_tm)
681684

682685
return local_tm;
683686
}
687+
#endif
684688

685689
if( gmtime64_r(time, &gm_tm) == NULL ) {
686690
TIME64_TRACE1("gmtime64_r returned null for %lld\n", *time);

0 commit comments

Comments
 (0)