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.
This commit is contained in:
Greg King 2022-01-30 19:59:32 -05:00 committed by mrdudz
parent f1e70517ec
commit 5cad3ce55a
1 changed files with 4 additions and 7 deletions

View File

@ -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;
}