From 09b201101478e6e1c858fc4ef4f859d88a2b8a49 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Wed, 27 Jan 2021 19:38:12 +1100 Subject: libnvram: Compile with -Wextra -Wextra enables a bunch of rather useful checks which this fixes. Signed-off-by: Alexey Kardashevskiy --- lib/libnvram/nvram.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'lib/libnvram/nvram.c') diff --git a/lib/libnvram/nvram.c b/lib/libnvram/nvram.c index 99deb2a..6d145d7 100644 --- a/lib/libnvram/nvram.c +++ b/lib/libnvram/nvram.c @@ -163,7 +163,7 @@ nvram_access(uint64_t, 64, qword) * @return pointer to temporary buffer */ -char *get_nvram_buffer(int len) +char *get_nvram_buffer(unsigned len) { if(len>NVRAM_LENGTH) return NULL; @@ -271,7 +271,7 @@ static uint8_t calc_partition_header_checksum(int offset) static int calc_used_nvram_space(void) { - int walk, len; + unsigned walk, len; for (walk=0; walk