From ae18a158fc8bead9f17d66629f573213cc4538c4 Mon Sep 17 00:00:00 2001 From: ddouthitt Date: Fri, 5 Oct 2001 22:04:35 +0000 Subject: [PATCH] Numerous (TINY) fixes: mostly unused variables... --- server/client_functions.c | 6 +++--- server/drivers/curses_drv.c | 13 +++++++------ server/drivers/lcd.c | 4 ++-- server/drivers/lcd_lib.c | 4 ++-- server/input.c | 4 ++-- server/main.c | 2 +- server/parse.c | 8 ++++---- server/serverscreens.c | 2 +- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/server/client_functions.c b/server/client_functions.c index 773116e..fe5c68d 100644 --- a/server/client_functions.c +++ b/server/client_functions.c @@ -325,7 +325,7 @@ client_del_key_func (client * c, int argc, char **argv) int screen_add_key_func (client * c, int argc, char **argv) { - widget * w ; /* Keys are stored on a WID_KEYS widget */ + //widget * w ; /* Keys are stored on a WID_KEYS widget */ screen * s ; /* Attached to a specific screen */ char * id ; /* Screen ID */ char * keys ; /* Keys wanted */ @@ -397,7 +397,7 @@ screen_add_key_func (client * c, int argc, char **argv) int screen_del_key_func (client * c, int argc, char **argv) { - widget * w ; /* Keys are stored on a WID_KEYS widget */ + //widget * w ; /* Keys are stored on a WID_KEYS widget */ screen * s ; /* Attached to a specific screen */ char * id ; /* Screen ID */ char * keys ; /* Keys wanted */ @@ -1290,7 +1290,7 @@ backlight_func (client * c, int argc, char **argv) int output_func (client * c, int argc, char **argv) { - int rc = 0; + //int rc = 0; char str[128]; if (argc != 2) { diff --git a/server/drivers/curses_drv.c b/server/drivers/curses_drv.c index 9169a8a..2170c09 100644 --- a/server/drivers/curses_drv.c +++ b/server/drivers/curses_drv.c @@ -276,8 +276,8 @@ curses_drv_init (struct lcd_logical_driver *driver, char *args) static void curses_drv_wborder (WINDOW *win) { - int x, y; - char buf[128]; + //int x, y; + //char buf[128]; if (has_colors()) { wcolor_set(win, current_border_pair, NULL); @@ -327,8 +327,8 @@ curses_drv_clear () werase (lcd_win); } -#define ValidX(a) { if (x > curses_drv->wid) { x = curses_drv->wid; } else x < 1 ? 1 : x; } -#define ValidY(a) { if (y > curses_drv->hgt) { y = curses_drv->hgt; } else y < 1 ? 1 : y; } +#define ValidX(x) { if ((x) > curses_drv->wid) { (x) = curses_drv->wid; } else (x) < 1 ? 1 : x; } +#define ValidY(y) { if ((y) > curses_drv->hgt) { (y) = curses_drv->hgt; } else (y) < 1 ? 1 : y; } void curses_drv_backlight (int on) @@ -354,7 +354,8 @@ curses_drv_backlight (int on) return; break; } - curses_drv_clear; + + curses_drv_clear(); } ///////////////////////////////////////////////////////////////// @@ -364,7 +365,7 @@ curses_drv_backlight (int on) void curses_drv_string (int x, int y, char *string) { - int i; + //int i; unsigned char *p; ValidX(x); diff --git a/server/drivers/lcd.c b/server/drivers/lcd.c index b32cb02..585c925 100644 --- a/server/drivers/lcd.c +++ b/server/drivers/lcd.c @@ -400,7 +400,7 @@ lcd_find_init (char *driver) { struct lcd_logical_driver * lcd_allocate_driver () { struct lcd_logical_driver *driver; - int driver_size; + //int driver_size; // This bit of fakery allows us to use lcd as the first // allocated buffer, which is what everything currently uses for @@ -506,7 +506,7 @@ lcd_add_driver (char *driver, char *args) int lcd_shutdown () { - lcd_logical_driver *driver; + //lcd_logical_driver *driver; // This does not shutdown any input sources; // is that sufficient? diff --git a/server/drivers/lcd_lib.c b/server/drivers/lcd_lib.c index e920cfb..6e0921b 100644 --- a/server/drivers/lcd_lib.c +++ b/server/drivers/lcd_lib.c @@ -62,7 +62,7 @@ new_framebuf (struct lcd_logical_driver *driver, char *oldbuf) { void insert_str_framebuf (struct lcd_logical_driver *driver, int x, int y, char *string) { - int i; + //int i; char buf[64]; char *pos; @@ -93,7 +93,7 @@ insert_chr_framebuf (struct lcd_logical_driver *driver, int x, int y, char c) { x--; y--; - if (x >= driver->wid) driver->wid; + if (x >= driver->wid) x = driver->wid; if (x < 0) x = 0; if (y >= driver->hgt) y = driver->hgt; diff --git a/server/input.c b/server/input.c index ad19c59..524504f 100644 --- a/server/input.c +++ b/server/input.c @@ -99,8 +99,8 @@ handle_input () char str[15]; int key; screen *s; - widget *w; - client *c; + //widget *w; + //client *c; if ((key = lcd_ptr->getkey ()) == 0) return 0; diff --git a/server/main.c b/server/main.c index ce08b89..5659679 100644 --- a/server/main.c +++ b/server/main.c @@ -127,7 +127,7 @@ main (int argc, char **argv) int daemon_mode = 1; int disable_server_screen = 1; screen *s = NULL; - char *str, *ing; // strings for commandline handling + //char *str, *ing; // strings for commandline handling char user[64]; char c, buf[64], *driverlist[MAX_DRIVERS], *driverargs[MAX_DRIVERS]; char linebuf[128], driver_name[64]; diff --git a/server/parse.c b/server/parse.c index 4a5ca71..6fcbee6 100644 --- a/server/parse.c +++ b/server/parse.c @@ -25,14 +25,14 @@ int parse_all_client_messages () { - int i, j, len; - int newtoken, inquote; + int i; // int j, len; + //int newtoken, inquote; client *c; char *str, *p, *q, *s; // char *tok; int argc; char *argv[256]; - char delimiters[] = " "; + //char delimiters[] = " "; char leftquote[] = "\"'`([{"; char rightquote[] = "\"'`)]}"; char errmsg[256]; @@ -40,7 +40,7 @@ parse_all_client_messages () int quoteindex; for (i = 0; i <= 256; i++) { - argv[i] == NULL; + argv[i] = NULL; } #define SEPARATOR_CHAR ' ' diff --git a/server/serverscreens.c b/server/serverscreens.c index fdd1c04..8c8587e 100644 --- a/server/serverscreens.c +++ b/server/serverscreens.c @@ -110,7 +110,7 @@ update_server_screen (int timer) { client *c; int num_clients; - screen *s; + //screen *s; int num_screens; // Draw a title...