littlefs-project / littlefs

A little fail-safe filesystem designed for microcontrollers
BSD 3-Clause "New" or "Revised" License
4.92k stars 774 forks source link

using uninitialized struct #854

Closed mdahamshi closed 11 months ago

mdahamshi commented 1 year ago

Hey in lfs.c line 880: struct lfs_diskoff disk;

we use disk at line 918 without initializing it, this case an runtime check error in some compilers. we should initlize it: struct lfs_diskoff disk; = {0};

geky commented 11 months ago

Should be resolved by https://github.com/littlefs-project/littlefs/pull/855, thanks for the PR! Will merge on the next path release.

mdahamshi commented 11 months ago

Thank you.