littlefs example: Fix use of uninitialized variable
The littlefs example stores the status of closing a file in `close_ret`.
If an error happens before a file is even opened, no closing is
performed and `close_ret` is not set. To avoid problems when we check
its value near the end of the `main()` and decide the application's
return value, initialize `close_ret` (and `unmount_ret` to be extra
safe in case we make further code changes in the future) to zero.
This issue was warned by the compiler.
Signed-off-by:
Lingkai Dong <lingkai.dong@arm.com>
Loading
Please register or sign in to comment