mirror of
https://github.com/armink/FlashDB.git
synced 2025-02-04 08:43:07 +08:00
[fdb_kvdb]: fix shadow warning (#272)
```bash FlashDB/src/fdb_kvdb.c: In function ‘read_sector_info’: FlashDB/src/fdb_kvdb.c:488:23: warning: declaration of ‘sector_cache’ shadows a previous local [-Wshadow] 488 | kv_sec_info_t sector_cache = get_sector_from_cache(db, sector->addr); | ^~~~~~~~~~~~ FlashDB/src/fdb_kvdb.c:421:19: note: shadowed declaration is here 421 | kv_sec_info_t sector_cache = get_sector_from_cache(db, addr); | ^~~~~~~~~~~~ ``` Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
parent
760520564c
commit
7dfed14304
@ -485,8 +485,8 @@ static fdb_err_t read_sector_info(fdb_kvdb_t db, uint32_t addr, kv_sec_info_t se
|
|||||||
#ifdef FDB_KV_USING_CACHE
|
#ifdef FDB_KV_USING_CACHE
|
||||||
update_sector_cache(db, sector);
|
update_sector_cache(db, sector);
|
||||||
} else {
|
} else {
|
||||||
kv_sec_info_t sector_cache = get_sector_from_cache(db, sector->addr);
|
kv_sec_info_t sec_cache = get_sector_from_cache(db, sector->addr);
|
||||||
if (!sector_cache) {
|
if (!sec_cache) {
|
||||||
sector->empty_kv = FAILED_ADDR;
|
sector->empty_kv = FAILED_ADDR;
|
||||||
sector->remain = 0;
|
sector->remain = 0;
|
||||||
update_sector_cache(db, sector);
|
update_sector_cache(db, sector);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user