armink / FlashDB

An ultra-lightweight database that supports key-value and time series data | 一款支持 KV 数据和时序数据的超轻量级数据库
Apache License 2.0
1.7k stars 400 forks source link

[fdb_kvdb]: fix shadow warning #272

Closed FASTSHIFT closed 6 months ago

FASTSHIFT commented 6 months ago
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);
      |                   ^~~~~~~~~~~~
armink commented 6 months ago

Thx