From 6339c4cbeb608b008eafe0b1e358285ae08ef902 Mon Sep 17 00:00:00 2001 From: Russell Rice Date: Thu, 21 Sep 2006 11:13:28 +0000 Subject: Fix a lot of warnings (for fussy compilers) and one always-true check Subversion-branch: /trunk/chocolate-doom Subversion-revision: 641 --- textscreen/txt_button.c | 1 + textscreen/txt_checkbox.c | 1 + textscreen/txt_dropdown.c | 1 + textscreen/txt_inputbox.c | 2 ++ textscreen/txt_io.c | 2 +- textscreen/txt_label.c | 1 + textscreen/txt_main.c | 32 ++++++++++++++++---------------- textscreen/txt_radiobutton.c | 1 + textscreen/txt_separator.c | 1 + textscreen/txt_spinctrl.c | 1 + textscreen/txt_strut.c | 1 + textscreen/txt_window_action.c | 1 + 12 files changed, 28 insertions(+), 17 deletions(-) (limited to 'textscreen') diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c index 9e5b6d0d..e8420558 100644 --- a/textscreen/txt_button.c +++ b/textscreen/txt_button.c @@ -101,6 +101,7 @@ txt_widget_class_t txt_button_class = TXT_ButtonKeyPress, TXT_ButtonDestructor, TXT_ButtonMousePress, + 0, }; void TXT_SetButtonLabel(txt_button_t *button, char *label) diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c index bb26211f..37fb0747 100644 --- a/textscreen/txt_checkbox.c +++ b/textscreen/txt_checkbox.c @@ -122,6 +122,7 @@ txt_widget_class_t txt_checkbox_class = TXT_CheckBoxKeyPress, TXT_CheckBoxDestructor, TXT_CheckBoxMousePress, + 0, }; txt_checkbox_t *TXT_NewCheckBox(char *label, int *variable) diff --git a/textscreen/txt_dropdown.c b/textscreen/txt_dropdown.c index 0dbdec4d..504d4156 100644 --- a/textscreen/txt_dropdown.c +++ b/textscreen/txt_dropdown.c @@ -265,6 +265,7 @@ txt_widget_class_t txt_dropdown_list_class = TXT_DropdownListKeyPress, TXT_DropdownListDestructor, TXT_DropdownListMousePress, + 0, }; txt_dropdown_list_t *TXT_NewDropdownList(int *variable, char **values, diff --git a/textscreen/txt_inputbox.c b/textscreen/txt_inputbox.c index c3f4f255..4ef1300c 100644 --- a/textscreen/txt_inputbox.c +++ b/textscreen/txt_inputbox.c @@ -235,6 +235,7 @@ txt_widget_class_t txt_inputbox_class = TXT_InputBoxKeyPress, TXT_InputBoxDestructor, TXT_InputBoxMousePress, + 0, }; txt_widget_class_t txt_int_inputbox_class = @@ -244,6 +245,7 @@ txt_widget_class_t txt_int_inputbox_class = TXT_IntInputBoxKeyPress, TXT_InputBoxDestructor, TXT_InputBoxMousePress, + 0, }; static void SetBufferFromValue(txt_inputbox_t *inputbox) diff --git a/textscreen/txt_io.c b/textscreen/txt_io.c index 96a6e911..1e8106e7 100644 --- a/textscreen/txt_io.c +++ b/textscreen/txt_io.c @@ -59,7 +59,7 @@ static txt_color_t bgcolor = TXT_COLOR_BLACK; static int GetColorForName(char *s) { - int i; + size_t i; for (i=0; i