Skip to content

Conversation

@amubiera
Copy link
Contributor

Using negate on a bool causes a warning when compiling with MSVC 19.X:

littlefs\lfs.c(2561): error C2220: the following warning is treated as an error
littlefs\lfs.c(2561): warning C4804: '-': unsafe use of type 'bool' in operation

@geky-bot
Copy link
Collaborator

Tests passed ✓, Code: 17112 B (+0.0%), Stack: 1448 B (+0.0%), Structs: 812 B (+0.0%)
Code Stack Structs Coverage
Default 17112 B (+0.0%) 1448 B (+0.0%) 812 B (+0.0%) Lines 2429/2591 lines (-0.0%)
Readonly 6222 B (+0.0%) 448 B (+0.0%) 812 B (+0.0%) Branches 1280/1610 branches (+0.0%)
Threadsafe 17964 B (+0.0%) 1448 B (+0.0%) 820 B (+0.0%) Benchmarks
Multiversion 17184 B (+0.0%) 1448 B (+0.0%) 816 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18776 B (+0.0%) 1752 B (+0.0%) 816 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17884 B (+0.0%) 1440 B (+0.0%) 812 B (+0.0%) Erased 1568888832 B (+0.0%)

@amubiera amubiera force-pushed the fix-unsafe-use-of-bool branch from 7ccfd91 to 152d030 Compare February 3, 2025 23:59
@geky-bot
Copy link
Collaborator

geky-bot commented Feb 4, 2025

Tests passed ✓, Code: 17104 B (+0.0%), Stack: 1448 B (+0.0%), Structs: 812 B (+0.0%)
Code Stack Structs Coverage
Default 17104 B (+0.0%) 1448 B (+0.0%) 812 B (+0.0%) Lines 2429/2591 lines (-0.0%)
Readonly 6222 B (+0.0%) 448 B (+0.0%) 812 B (+0.0%) Branches 1278/1608 branches (+0.0%)
Threadsafe 17956 B (+0.0%) 1448 B (+0.0%) 820 B (+0.0%) Benchmarks
Multiversion 17176 B (+0.0%) 1448 B (+0.0%) 816 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18768 B (+0.0%) 1752 B (+0.0%) 816 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17884 B (+0.0%) 1440 B (+0.0%) 812 B (+0.0%) Erased 1568888832 B (+0.0%)

@geky
Copy link
Member

geky commented Feb 4, 2025

Looks good here, thanks for creating a PR!

Will bring this in on the next patch release.

@geky geky added the next patch label Feb 4, 2025
@geky geky changed the base branch from master to devel March 20, 2025 06:21
@geky geky merged commit ca1081e into littlefs-project:devel Mar 20, 2025
93 checks passed
@geky
Copy link
Member

geky commented Mar 20, 2025

Sorry about the delay, will be releasing this shortly. Thanks for the PR!

@amubiera amubiera deleted the fix-unsafe-use-of-bool branch March 25, 2025 02:50
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.

3 participants