-
Notifications
You must be signed in to change notification settings - Fork 411
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
Lots of static analysis bugs #6
Comments
Could you please inform me of what compiler and with what flags you encounter this? And what flags are you using in spiffs_config.h? |
Clang scan-build with arm-none-eabi-gcc with -Wall |
Ok thanks. Seems plain linux gcc -Wall does not report as much as an arm cross-compiled gcc. Weird. I'll look into it and fix it. |
For maximum effect: gcc: g++: |
Fixed. Phew. Found one bug amongst all warnings. Thanks! |
spiffs_nucleus.c spiffs_object_modify line 1218 new_objix_pix is never initialized
spiffs_nucleus.c spiffs_obj_lu_find_free_obj_id line 1710 possible division by zero
state.compaction = (state.max_obj_id-state.min_obj_id) / ((SPIFFS_CFG_LOG_PAGE_SZ(fs) / sizeof(u8_t)));
Also lots of warnings for never read result value. Better to not store result at all otherwise written code has no effect.
spiffs_nucleus.c spiffs_object_modify line 1135 value of res is never read
spiffs_hydrogen.c SPIFFS_write line 324 value of res never read
spiffs_hydrogen.c SPIFFS_check line 700 res never read
...
The text was updated successfully, but these errors were encountered: