From 5cad3ce55a1c4c8a86fd3f11453e20510a99f4a7 Mon Sep 17 00:00:00 2001 From: Greg King Date: Sun, 30 Jan 2022 19:59:32 -0500 Subject: [PATCH] Fixed heaptest.c compiler warnings in a way that's better than PR #1621. This fix adds "unsigned" to one line instead of removing it from several lines. --- targettest/heaptest.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/targettest/heaptest.c b/targettest/heaptest.c index e3a21eaa6..f33808261 100644 --- a/targettest/heaptest.c +++ b/targettest/heaptest.c @@ -6,18 +6,18 @@ -static char* V[256]; +static unsigned char* V[256]; -static char* Alloc (void) +static unsigned char* Alloc (void) /* Allocate a random sized chunk of memory */ { /* Determine the size */ unsigned char Size = (((unsigned char)rand()) & 0x7F) + 1; /* Allocate memory */ - char* P = malloc (Size); + unsigned char* P = malloc (Size); /* Set the string to a defined value. We use the size, since this will ** also allow us to retrieve it later. @@ -33,7 +33,7 @@ static char* Alloc (void) -static void Free (char* P) +static void Free (unsigned char* P) /* Check a memory block and free it */ { unsigned char I; @@ -234,6 +234,3 @@ int main (void) /* Done */ return EXIT_SUCCESS; } - - -