Skip to content

Commit 65ebf24

Browse files
committed
Resolving some of compiler's warnings
1 parent 1bb9bd6 commit 65ebf24

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/core/t-date.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
bp = Form_Int(bp, tz / 4);
155155
}
156156
*bp++ = ':';
157-
bp = Form_Int_Pad(bp, (tz & 3) * 15, 2, 2, '0');
157+
bp = Form_Int_Pad(bp, ((REBI64)tz & 3) * 15, 2, 2, '0');
158158
*bp = 0;
159159

160160
Append_Bytes(mold->series, cs_cast(buf));
@@ -531,7 +531,7 @@
531531
REBINT day, month, year;
532532
REBINT num;
533533
REBVAL dat;
534-
REB_TIMEF time;
534+
REB_TIMEF time = {0,0,0,0};
535535
REBOOL asTimezone = FALSE;
536536

537537
if (!IS_DATE(data)) return PE_BAD_ARGUMENT;
@@ -677,7 +677,7 @@
677677
if (tz > MAX_ZONE || tz < -MAX_ZONE) return PE_BAD_RANGE;
678678
if (secs == NO_TIME) secs = 0;
679679
if (asTimezone) {
680-
secs += ((i64)(tz - tzp) * ((i64)ZONE_SECS * SEC_SEC));
680+
secs += (((i64)tz - tzp) * ((i64)ZONE_SECS * SEC_SEC));
681681
}
682682
break;
683683
case SYM_DATE:
@@ -731,9 +731,8 @@
731731
***********************************************************************/
732732
{
733733
REBI64 secs;
734-
REBINT tz;
735734
REBDAT date;
736-
REBINT day, month, year;
735+
REBINT day = 0, month = 0, year = 0, tz = 0;
737736
REBVAL *val;
738737
REBVAL *arg = NULL;
739738
REBINT num;
@@ -752,7 +751,7 @@
752751
if (DS_ARGC > 1) arg = D_ARG(2);
753752

754753
if (IS_BINARY_ACT(action)) {
755-
REBINT type = VAL_TYPE(arg);
754+
REBINT type = VAL_TYPE(arg);
756755

757756
if (type == REB_DATE) {
758757
if (action == A_SUBTRACT) {

0 commit comments

Comments
 (0)