Patrick Georgi merged this change.
src/lib/hexdump: Use size_t for indices
Spotted out using -Wconversion gcc warning option.
Change-Id: I29a7ae8c499bb1e8ab7c8741b2dfb7663d82a362
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
---
M src/lib/hexdump.c
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c
index 1e689e3..2c9e483 100644
--- a/src/lib/hexdump.c
+++ b/src/lib/hexdump.c
@@ -19,14 +19,13 @@
void hexdump(const void *memory, size_t length)
{
- int i;
+ size_t i, j;
uint8_t *line;
int all_zero = 0;
int all_one = 0;
size_t num_bytes;
for (i = 0; i < length; i += 16) {
- int j;
num_bytes = MIN(length - i, 16);
line = ((uint8_t *)memory) + i;
@@ -65,7 +64,7 @@
void hexdump32(char LEVEL, const void *d, size_t len)
{
- int count = 0;
+ size_t count = 0;
while (len > 0) {
if (count % 8 == 0) {
To view, visit change 33799. To unsubscribe, or for help writing mail filters, visit settings.