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
fs/littlefs:littlefs shouldn't be used without C99 BOOL #9037
Conversation
Can we either add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-inspected the code of littlefs and see that CFLAGS += -std=c99
is a must and code has designated initialiser, variable declaration in the middle of the scope and other C99 features.
-std=c99 is tool chain specific, it isn't good to turn on it in the common code. |
But the littlefs code is anyway C89 in compliant no matter of a toolchain.
|
Yes, I think it's enough to warn the user if they enforce c89 accidently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Telling them why and what to do about would be better.
a2b8d5d
to
e04124d
Compare
Signed-off-by: XinStellaris <tianxin7@xiaomi.com>
2880cbc
to
144cf20
Compare
Summary
littlefs is a c99 project, and it malfunctions with c89. See disscusion in littlefs-project/littlefs#801.
To highlight this problem, littlefs added an assert in littlefs-project/littlefs#801.
However, it is better to expose this when compiling. This patch adds a compiling error when C99 requirement is not met.
Impact
Littlefs
Testing
Compiling okay.