Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initlize struct lfs_diskoff disk = {0} #855

Merged
merged 2 commits into from
Sep 3, 2023

Conversation

mdahamshi
Copy link

so we don't use it uninitlized in first run

@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 16678 B (+0.1%), Stack: 1432 B (+0.0%), Structs: 788 B (+0.0%)
Code Stack Structs Coverage
Default 16678 B (+0.1%) 1432 B (+0.0%) 788 B (+0.0%) Lines 2316/2496 lines (+0.0%)
Readonly 6126 B (+0.0%) 448 B (+0.0%) 788 B (+0.0%) Branches 1184/1506 branches (-0.0%)
Threadsafe 17506 B (+0.1%) 1432 B (+0.0%) 796 B (+0.0%) Benchmarks
Multiversion 16754 B (+0.1%) 1432 B (+0.0%) 792 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18362 B (+0.1%) 1736 B (+0.0%) 792 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17310 B (+0.0%) 1424 B (+0.0%) 788 B (+0.0%) Erased 1568888832 B (+0.0%)

@geky
Copy link
Member

geky commented Aug 3, 2023

Hi @mdahamshi, thanks for creating a PR.

It's worth noting that this struct does not get used unless the top-bit of the tag is set, which only happens when we initialize the struct's contents.

But we can bring this in to at least silence the warning.

@geky geky added the next patch label Aug 3, 2023
@geky geky added the lint label Aug 3, 2023
@geky geky changed the base branch from master to devel August 3, 2023 16:20
so we don't use it uninitlized in first run
@geky-bot
Copy link
Collaborator

geky-bot commented Aug 3, 2023

Tests passed ✓, Code: 16678 B (+0.1%), Stack: 1432 B (+0.0%), Structs: 788 B (+0.0%)
Code Stack Structs Coverage
Default 16678 B (+0.1%) 1432 B (+0.0%) 788 B (+0.0%) Lines 2316/2496 lines (+0.0%)
Readonly 6126 B (+0.0%) 448 B (+0.0%) 788 B (+0.0%) Branches 1184/1506 branches (-0.0%)
Threadsafe 17506 B (+0.1%) 1432 B (+0.0%) 796 B (+0.0%) Benchmarks
Multiversion 16754 B (+0.1%) 1432 B (+0.0%) 792 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18362 B (+0.1%) 1736 B (+0.0%) 792 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17310 B (+0.0%) 1424 B (+0.0%) 788 B (+0.0%) Erased 1568888832 B (+0.0%)

@geky geky mentioned this pull request Aug 3, 2023
@geky geky merged commit 531d5e5 into littlefs-project:devel Sep 3, 2023
93 checks passed
@geky
Copy link
Member

geky commented Sep 3, 2023

Thanks again for this, and everyone else who reported/proposed a fix. Sorry about taking so long to merge. There was some integration issues in the dependent littlefs-fuse I wanted to fix before making another release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants