diff --git a/server/menu.c b/server/menu.c index 2b94ee0..634ab02 100644 --- a/server/menu.c +++ b/server/menu.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "config.h" @@ -252,6 +253,8 @@ void menu_build_screen (MenuItem *menu, Screen *s) (w->text)[display_props->width-1] = '\0'; } break; + default: + assert(!"unexpected menuitem type"); } } } @@ -447,8 +450,6 @@ MenuResult menu_process_input (Menu *menu, MenuToken token, char * key, bool ext case MENUITEM_NUMERIC: case MENUITEM_ALPHA: case MENUITEM_IP: - //if (subitem->event_func) - // subitem->event_func (subitem, MENUEVENT_ENTER); return MENURESULT_ENTER; default: break; diff --git a/server/menu.h b/server/menu.h index a4ac15b..b1bbf0a 100644 --- a/server/menu.h +++ b/server/menu.h @@ -39,17 +39,12 @@ typedef MenuItem Menu; Menu *menu_create (char *id, MenuEventFunc(*event_func), char *text, void *association); -/* Creates a new menu. - */ -/* Creates a string value box. - * Association is free to set to anything you want. It's not used by the menu. - * Generated events: MENUEVENT_ENTER upon entering this menu, - */ +/* Creates a new menu. */ void menu_destroy (Menu *menu); /* Deletes menu from memory. * Destructors will be called for all subitems. - * DO NOT CALL THIS FUNCTION, CALL menuitem_destoy INSTEAD ! + * DO NOT CALL THIS FUNCTION, CALL menuitem_destroy INSTEAD ! */ void menu_add_item (Menu *menu, MenuItem *item); diff --git a/server/render.c b/server/render.c index 26bd02a..72fd8f8 100644 --- a/server/render.c +++ b/server/render.c @@ -174,7 +174,7 @@ render_frame (LinkedList * list, int vis_width = right - left; /* width of visible frame area */ int vis_height = bottom - top; /* height of visible frame area */ int x, y; - int fx = 0, fy = 0; /* Scrolling offset for the frame... */ + int /*fx = 0,*/ fy = 0; /* Scrolling offset for the frame... */ int length, speed; int str_length = BUFSIZE-1; int reset = 1; diff --git a/server/sock.c b/server/sock.c index 3c85f98..e77f474 100644 --- a/server/sock.c +++ b/server/sock.c @@ -176,7 +176,8 @@ sock_shutdown () { if (clientIt->client) { - /* destroying a client also closes its socket */ + */ + /* destroying a client also closes its socket */ /* client_destroy(clientIt->client); } } diff --git a/shared/sockets.c b/shared/sockets.c index 0c20de1..5cfa951 100644 --- a/shared/sockets.c +++ b/shared/sockets.c @@ -268,7 +268,6 @@ sock_recv (int fd, void *dest, size_t maxlen) } /*****************************************************************************/ -static char retString[256]; char* sock_geterror(void) @@ -276,6 +275,7 @@ sock_geterror(void) #ifndef WINSOCK2 return strerror(errno); #else + static char retString[256]; long err; char* tmp;