Fixes for 'Implicit conversion loses integer precision' warnings.#1161
Fixes for 'Implicit conversion loses integer precision' warnings.#1161geky merged 1 commit intolittlefs-project:develfrom
Conversation
Tests passed ✓, Code: 17128 B (+0.0%), Stack: 1448 B (+0.0%), Structs: 812 B (+0.0%)
|
|
Hi @amubiera, thanks for creating a PR, and sorry for the late response. These casts look reasonable to me, just one nit on the tag cast. |
That's an interesting question. Not without significant changes as least. We write Even on 64-bit machines, keeping Unfortunately changing the codebase to support 64-bit lfs_size_t, even just to error on >2GiB inputs, would require a significant amount of work. |
e7d5b44 to
dbe96d0
Compare
Tests passed ✓, Code: 17128 B (+0.0%), Stack: 1448 B (+0.0%), Structs: 812 B (+0.0%)
|
geky
left a comment
There was a problem hiding this comment.
Looks good here, thanks for this. Will bring this in on the next patch release.
|
Sorry for the delay, this is finally coming in. Thanks again for the pr! |
Since
lfs_size_tis defined asuint32_tand notsize_t, there are a few warnings for conversion fromunsigned long(64-bit) tounsigned int(32-bit) on 64-bit platforms.Perhaps
lfs_size_tshould be defined assize_tinstead?