mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-10 05:04:42 +00:00
Fix CI errors and CPPcheck warnings
This commit is contained in:
parent
486c56e651
commit
30fffbdc01
@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "STM32_LittleFS.h"
|
||||
#include "littlefs/lfs.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#define rtos_malloc malloc
|
||||
|
@ -25,6 +25,8 @@
|
||||
#ifndef STM32_LITTLEFS_FILE_H_
|
||||
#define STM32_LITTLEFS_FILE_H_
|
||||
|
||||
#include "littlefs/lfs.h"
|
||||
|
||||
// Forward declaration
|
||||
class STM32_LittleFS;
|
||||
|
||||
|
@ -502,7 +502,7 @@ static int lfs_dir_commit(lfs_t *lfs, lfs_dir_t *dir, const struct lfs_region *r
|
||||
bool relocated = false;
|
||||
|
||||
while (true) {
|
||||
if (true) {
|
||||
|
||||
int err = lfs_bd_erase(lfs, dir->pair[0]);
|
||||
if (err) {
|
||||
if (err == LFS_ERR_CORRUPT) {
|
||||
@ -589,7 +589,6 @@ static int lfs_dir_commit(lfs_t *lfs, lfs_dir_t *dir, const struct lfs_region *r
|
||||
if (ncrc != crc) {
|
||||
goto relocate;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
relocate:
|
||||
@ -607,7 +606,7 @@ static int lfs_dir_commit(lfs_t *lfs, lfs_dir_t *dir, const struct lfs_region *r
|
||||
}
|
||||
|
||||
// relocate half of pair
|
||||
int err = lfs_alloc(lfs, &dir->pair[0]);
|
||||
err = lfs_alloc(lfs, &dir->pair[0]);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user