1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00

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

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 */ /* Allocate a random sized chunk of memory */
{ {
/* Determine the size */ /* Determine the size */
unsigned char Size = (((unsigned char)rand()) & 0x7F) + 1; unsigned char Size = (((unsigned char)rand()) & 0x7F) + 1;
/* Allocate memory */ /* 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 /* Set the string to a defined value. We use the size, since this will
** also allow us to retrieve it later. ** 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 */ /* Check a memory block and free it */
{ {
unsigned char I; unsigned char I;
@ -234,6 +234,3 @@ int main (void)
/* Done */ /* Done */
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }