Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fdb_kvdb]: fix shadow warning #272

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Conversation

FASTSHIFT
Copy link
Contributor

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);
      |                   ^~~~~~~~~~~~

```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>
@armink armink merged commit 7dfed14 into armink:master Jan 2, 2024
1 check passed
@armink
Copy link
Owner

armink commented Jan 2, 2024

Thx

AguileraG pushed a commit to AguileraG/FlashDB that referenced this pull request Apr 3, 2024
```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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants