From 0ac1b8d6b12575c2ac225744c4fb69bdfa6e9d24 Mon Sep 17 00:00:00 2001 From: Sven Michael Klose Date: Sat, 25 Dec 2021 09:57:18 +0100 Subject: [PATCH] Remove most compiler warnings. --- targettest/gamate/ctest.c | 3 +++ targettest/heaptest.c | 6 +++--- targettest/strdup-test.c | 2 +- targettest/tinyshell.c | 14 +++++++------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/targettest/gamate/ctest.c b/targettest/gamate/ctest.c index bff3f5986..b2c3740c5 100644 --- a/targettest/gamate/ctest.c +++ b/targettest/gamate/ctest.c @@ -9,6 +9,9 @@ unsigned short n; int main(int argc, char *argv[]) { + (void) argc; // Suppress warnings. + (void) argv; + clrscr(); gotoxy(0,0);cputs("Gamate C-Test"); diff --git a/targettest/heaptest.c b/targettest/heaptest.c index 560694bee..e3a21eaa6 100644 --- a/targettest/heaptest.c +++ b/targettest/heaptest.c @@ -6,7 +6,7 @@ -static unsigned char* V[256]; +static char* V[256]; @@ -17,7 +17,7 @@ static char* Alloc (void) unsigned char Size = (((unsigned char)rand()) & 0x7F) + 1; /* Allocate memory */ - unsigned char* P = malloc (Size); + 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 (unsigned char* P) +static void Free (char* P) /* Check a memory block and free it */ { unsigned char I; diff --git a/targettest/strdup-test.c b/targettest/strdup-test.c index 2fcc9816f..8e7ae87d8 100644 --- a/targettest/strdup-test.c +++ b/targettest/strdup-test.c @@ -5,7 +5,7 @@ #include <_heap.h> -static unsigned char* V[256]; +static char* V[256]; static void ShowInfo (void) /* Show heap info */ diff --git a/targettest/tinyshell.c b/targettest/tinyshell.c index c83bd14e8..71e9b56e3 100644 --- a/targettest/tinyshell.c +++ b/targettest/tinyshell.c @@ -60,13 +60,13 @@ extern unsigned int getsp(void); /* comes from getsp.s */ static unsigned char verbose; static unsigned char terminate; static unsigned char cmd; -static unsigned char *cmd_asc, *arg1, *arg2, *arg3, *args; /* 'args': everything after command */ -static unsigned char keyb_buf[KEYB_BUFSZ + 1]; -static unsigned char keyb_buf2[KEYB_BUFSZ + 1]; +static char *cmd_asc, *arg1, *arg2, *arg3, *args; /* 'args': everything after command */ +static char keyb_buf[KEYB_BUFSZ + 1]; +static char keyb_buf2[KEYB_BUFSZ + 1]; static size_t cpbuf_sz = 4096; struct cmd_table { - unsigned char *name; + char *name; unsigned char code; } cmd_table[] = { { "help", CMD_HELP }, @@ -196,7 +196,7 @@ static void cmd_help(void) static void cmd_ls(void) { DIR *dir; - unsigned char *arg; + char *arg; struct dirent *dirent; #ifdef __ATARI__ char need_free = 0; @@ -356,7 +356,7 @@ static void cmd_rename(void) static void cmd_exec(void) { - unsigned char *progname, *arguments; + char *progname, *arguments; progname = strtok(args, " \t\n"); if (! progname) { @@ -373,7 +373,7 @@ static void cmd_exec(void) static void cmd_copy(void) { int srcfd = -1, dstfd = -1; - unsigned char *buf; + char *buf; int readsz, writesz; if (!arg2 || arg3) {