From a415a5d996550ee3b0e60ef5fc0b0fbd87e7d13d Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Fri, 11 Nov 2022 21:55:26 +0100 Subject: [PATCH] cli_classic.c: Be consistent with pointer types With `i586-pc-msdosdjgpp-gcc (GCC) 12.2.0`, `uint32_t` is defined as `long unsigned int`, which is not the same as `unsigned int`. As the `flashrom_layout_get_region_range()` function is part of libflashrom API, adjust `cli_classic.c` instead to avoid type mismatches. Original-Signed-off-by: Angel Pons Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/69451 Original-Reviewed-by: Arthur Heymans Original-Reviewed-by: Evan Benn Original-Reviewed-by: Nikolai Artemiev Original-Tested-by: build bot (Jenkins) Change-Id: Ie8f5bc0d9296f7c6b8f8a351b53052f5fe86b09d Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/flashrom/+/69995 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Edward O'Callaghan --- cli_classic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli_classic.c b/cli_classic.c index a77422e6e..4649c7343 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -126,7 +126,7 @@ static bool check_file(FILE *file) return true; } -static int parse_wp_range(uint32_t *start, uint32_t *len) +static int parse_wp_range(unsigned int *start, unsigned int *len) { char *endptr = NULL, *token = NULL; @@ -568,7 +568,7 @@ int main(int argc, char *argv[]) int namelen, opt, i, j; int startchip = -1, chipcount = 0, option_index = 0; int operation_specified = 0; - uint32_t wp_start = 0, wp_len = 0; + unsigned int wp_start = 0, wp_len = 0; bool force = false, ifd = false, fmap = false; #if CONFIG_PRINT_WIKI == 1 bool list_supported_wiki = false;