Skip to content

Commit a9f977b

Browse files
authored
Merge pull request #66 from tahoe-lafs/fix-compiler-type-warnings
Fix compiler warnings related to signedness mismatch in comparisons
2 parents 56b702a + 3eea2c0 commit a9f977b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

zfec/_fecmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Encoder_encode(Encoder *self, PyObject *args) {
134134
if (!PyArg_ParseTuple(args, "O|O:Encoder.encode", &inblocks, &desired_blocks_nums))
135135
return NULL;
136136

137-
for (i = 0; i < self->mm - self->kk; i++)
137+
for (i = 0; i < (size_t)self->mm - (size_t)self->kk; i++)
138138
pystrs_produced[i] = NULL;
139139

140140
if (desired_blocks_nums) {

zfec/fec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ fec_new(unsigned short k, unsigned short n) {
444444
tmp_m[0] = 1;
445445
for (col = 1; col < k; col++)
446446
tmp_m[col] = 0;
447-
for (p = tmp_m + k, row = 0; row < n - 1; row++, p += k)
447+
for (p = tmp_m + k, row = 0; row + 1 < n; row++, p += k)
448448
for (col = 0; col < k; col++)
449449
p[col] = gf_exp[modnn (row * col)];
450450

0 commit comments

Comments
 (0)