Skip to content

Commit ad1f2a0

Browse files
committed
FIX: signed/unsigned mismatch warning
1 parent 23b8c81 commit ad1f2a0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/core/l-scan.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@
555555

556556
/***********************************************************************
557557
**
558-
*/ const REBYTE *Scan_Raw_String(const REBYTE *src, SCAN_STATE *scan_state, int num)
558+
*/ const REBYTE *Scan_Raw_String(const REBYTE *src, SCAN_STATE *scan_state, REBLEN num)
559559
/*
560560
** Scan a raw string (without any modifications).
561561
** Eliminates need of double escaping and allowes unmatched braces.

src/core/n-image.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ double weighted_rgb_color_distance(long r1, long g1, long b1, long r2, long g2,
312312
} else {
313313
pixels = VAL_IMAGE_WIDE(img1) * VAL_IMAGE_HIGH(img1);
314314

315-
for (int i = 0; i < pixels; i++, rgba1 += 4, rgba2 += 4) {
315+
for (REBCNT i = 0; i < pixels; i++, rgba1 += 4, rgba2 += 4) {
316316
dist += weighted_rgb_color_distance(
317317
rgba1[C_R], rgba1[C_G], rgba1[C_B],
318318
rgba2[C_R], rgba2[C_G], rgba2[C_B]

src/core/s-unicode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) {
808808
if (uni) {
809809
// not using wcslen, because on some systems wchar_t has 4 bytes!
810810
cnt = 0;
811-
while (*up++ != 0 && cnt < max) cnt++;
811+
while (*up++ != 0 && cnt < (REBLEN)max) cnt++;
812812
up = (REBUNI*)src;
813813
} else
814814
cnt = LEN_BYTES(bp);

0 commit comments

Comments
 (0)