[warnings] add -Wshadow which helps detect local variables that override globals

Nothing particularly bad showed up but cleaned up a bit of code.
This commit is contained in:
Travis Geiselbrecht
2020-07-25 16:46:34 -07:00
parent 82b4d6ffdb
commit f7d8e2300c
29 changed files with 117 additions and 126 deletions

View File

@@ -14,8 +14,6 @@
#include <lib/bio.h>
#include <lk/reg.h>
static bdev_t dev;
static uint64_t get_blkdev_len(void) {
return *REG64(BDEV_LEN);
}
@@ -51,6 +49,8 @@ ssize_t write_block(struct bdev *dev, const void *buf, bnum_t block, uint count)
}
void platform_init_blkdev(void) {
static bdev_t dev;
if ((*REG32(SYSINFO_FEATURES) & SYSINFO_FEATURE_BLOCKDEV) == 0)
return; // no block device