Skip to content

Commit

Permalink
Merge pull request #66 from tahoe-lafs/fix-compiler-type-warnings
Browse files Browse the repository at this point in the history
Fix compiler warnings related to signedness mismatch in comparisons
  • Loading branch information
exarkun authored Feb 1, 2022
2 parents 56b702a + 3eea2c0 commit a9f977b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zfec/_fecmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Encoder_encode(Encoder *self, PyObject *args) {
if (!PyArg_ParseTuple(args, "O|O:Encoder.encode", &inblocks, &desired_blocks_nums))
return NULL;

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

if (desired_blocks_nums) {
Expand Down
2 changes: 1 addition & 1 deletion zfec/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ fec_new(unsigned short k, unsigned short n) {
tmp_m[0] = 1;
for (col = 1; col < k; col++)
tmp_m[col] = 0;
for (p = tmp_m + k, row = 0; row < n - 1; row++, p += k)
for (p = tmp_m + k, row = 0; row + 1 < n; row++, p += k)
for (col = 0; col < k; col++)
p[col] = gf_exp[modnn (row * col)];

Expand Down

0 comments on commit a9f977b

Please sign in to comment.