Skip to content

Commit c255a5b

Browse files
committed
Fixed more signed/unsigned comparisons
1 parent cfd7f89 commit c255a5b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/rt/deh_win64_posix.d

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ extern (C) void _d_throwc(Object h)
278278
debug(PRINTF)
279279
{
280280
printf("handler_info[%d]:\n", dim);
281-
for (int i = 0; i < dim; i++)
281+
for (uint i = 0; i < dim; i++)
282282
{
283283
auto phi = &handler_table.handler_info.ptr[i];
284284
printf("\t[%d]: offset = x%04x, endoffset = x%04x, prev_index = %d, cioffset = x%04x, finally_offset = %x\n",
@@ -287,7 +287,7 @@ extern (C) void _d_throwc(Object h)
287287
}
288288

289289
auto index = -1;
290-
for (int i = 0; i < dim; i++)
290+
for (uint i = 0; i < dim; i++)
291291
{
292292
auto phi = &handler_table.handler_info.ptr[i];
293293

@@ -345,7 +345,7 @@ extern (C) void _d_throwc(Object h)
345345

346346
auto pci = cast(DCatchInfo *)(cast(char *)handler_table + phi.cioffset);
347347
auto ncatches = pci.ncatches;
348-
for (int i = 0; i < ncatches; i++)
348+
for (uint i = 0; i < ncatches; i++)
349349
{
350350
auto ci = **cast(ClassInfo **)h;
351351

src/rt/lifetime.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ extern (C) void[] _d_arraycatnT(const TypeInfo ti, uint n, ...)
20602060
__va_list argsave = __va_argsave.va;
20612061
va_list ap;
20622062
va_start(ap, __va_argsave);
2063-
for (auto i = 0; i < n; i++)
2063+
for (auto i = 0u; i < n; i++)
20642064
{
20652065
byte[] b;
20662066
va_arg(ap, b);
@@ -2111,7 +2111,7 @@ extern (C) void[] _d_arraycatnT(const TypeInfo ti, uint n, ...)
21112111
{
21122112
va_list ap2 = &argsave;
21132113
size_t j = 0;
2114-
for (auto i = 0; i < n; i++)
2114+
for (auto i = 0u; i < n; i++)
21152115
{
21162116
byte[] b;
21172117
va_arg(ap2, b);

0 commit comments

Comments
 (0)