Felix Singer has uploaded this change for review.

View Change

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-Change-Id: Ie8f5bc0d9296f7c6b8f8a351b53052f5fe86b09d
Original-Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/69451
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Evan Benn <evanbenn@google.com>
Original-Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Change-Id: I05dbda3923f1cd262bdad62e58f9c0ae7d7ffe6f
Signed-off-by: Felix Singer <felixsinger@posteo.net>
---
M cli_classic.c
1 file changed, 24 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/69983/1
diff --git a/cli_classic.c b/cli_classic.c
index a77422e..4649c73 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -126,7 +126,7 @@
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 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;

To view, visit change 69983. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: 1.3.x
Gerrit-Change-Id: I05dbda3923f1cd262bdad62e58f9c0ae7d7ffe6f
Gerrit-Change-Number: 69983
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: newchange