tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
373 stars 44 forks source link

Fix compiler type warnings #66

Closed exarkun closed 2 years ago

exarkun commented 2 years ago

This fixes some compiler warnings but not the Python API deprecation warnings.

Fixes #48

exarkun commented 2 years ago

Thanks @vu3rdd !

Looks good to me.

In general, it might be a good idea to remove global definitions of loop variables like i and make it live only inside the loop.

for (size_t i = 0; ... ) {
...
}

That is a good point and it makes sense to me. The fact that i is used in several loops and compared against different expressions of different types certainly made this harder to think about.

Do you think I should just do this now, or are the casts I put in surely safe and further refactoring would be just for future maintainability?

vu3rdd commented 2 years ago

Do you think I should just do this now, or are the casts I put in surely safe and further refactoring would be just for future maintainability?

Yes, makes sense to do it in a separate refactoring step..

exarkun commented 2 years ago

Do you think I should just do this now, or are the casts I put in surely safe and further refactoring would be just for future maintainability?

Yes, makes sense to do it in a separate refactoring step..

Great, thanks!