Skip to content

Commit 44d5e3a

Browse files
committed
FIX: preventing signed/unsigned mismatch warnings in Visual Studio
1 parent b692729 commit 44d5e3a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/core/d-dump.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
REBCNT cnt = 0;
7171

7272
cp = buf;
73-
for (l = 0; l < max_lines; l++) {
73+
for (l = 0; (int)l < max_lines; l++) {
7474
cp = Form_Hex_Pad(cp, (REBUPT) bp, 8);
7575

7676
*cp++ = ':';

src/core/n-loop.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
bodi = VAL_INDEX(D_ARG(mode+2));
203203

204204
// Starting location when past end with negative skip:
205-
if (inc < 0 && VAL_INDEX(var) >= (REBINT)VAL_TAIL(var)) {
205+
if (inc < 0 && VAL_INDEX(var) >= VAL_TAIL(var)) {
206206
VAL_INDEX(var) = (REBINT)VAL_TAIL(var) + inc;
207207
}
208208

src/core/s-unicode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ ConversionResult ConvertUTF8toUTF32 (
783783

784784
// Check that we have enough valid source bytes:
785785
if (len) {
786-
if (slen+1 > *len) return 0;
786+
if ((REBCNT)slen+1 > *len) return 0;
787787
}
788788
else {
789789
for (; slen >= 0; slen--)

src/core/t-date.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@
437437

438438
if (month < 1 || month > 12) return FALSE;
439439

440-
if (year > MAX_YEAR || day < 1 || day > (REBINT)(Month_Lengths[month-1])) return FALSE;
440+
if (year > MAX_YEAR || day < 1 || day > (REBCNT)(Month_Lengths[month-1])) return FALSE;
441441

442442
// Check February for leap year or century:
443443
if (month == 2 && day == 29) {

0 commit comments

Comments
 (0)