mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-10 21:19:07 +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 "STM32_LittleFS.h"
|
||||||
#include "littlefs/lfs.h"
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define rtos_malloc malloc
|
#define rtos_malloc malloc
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#ifndef STM32_LITTLEFS_FILE_H_
|
#ifndef STM32_LITTLEFS_FILE_H_
|
||||||
#define STM32_LITTLEFS_FILE_H_
|
#define STM32_LITTLEFS_FILE_H_
|
||||||
|
|
||||||
|
#include "littlefs/lfs.h"
|
||||||
|
|
||||||
// Forward declaration
|
// Forward declaration
|
||||||
class STM32_LittleFS;
|
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;
|
bool relocated = false;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (true) {
|
|
||||||
int err = lfs_bd_erase(lfs, dir->pair[0]);
|
int err = lfs_bd_erase(lfs, dir->pair[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err == LFS_ERR_CORRUPT) {
|
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) {
|
if (ncrc != crc) {
|
||||||
goto relocate;
|
goto relocate;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
relocate:
|
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
|
// relocate half of pair
|
||||||
int err = lfs_alloc(lfs, &dir->pair[0]);
|
err = lfs_alloc(lfs, &dir->pair[0]);
|
||||||
if (err) {
|
if (err) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user