Commit 1bda36e2e9552fdcb9f7778bb9603d3422c7f06e

Authored by Perry Werneck
1 parent 0f265d20
Exists in master and in 1 other branch develop

Fixing warnings.

src/dialogs/hostselect.c
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 89
90 /*--[ Implement ]------------------------------------------------------------------------------------*/ 90 /*--[ Implement ]------------------------------------------------------------------------------------*/
91 91
92 -static void V3270HostSelectWidget_class_init(V3270HostSelectWidgetClass *klass) 92 +static void V3270HostSelectWidget_class_init(G_GNUC_UNUSED V3270HostSelectWidgetClass *klass)
93 { 93 {
94 #if GTK_CHECK_VERSION(3,0,0) 94 #if GTK_CHECK_VERSION(3,0,0)
95 #else 95 #else
@@ -201,7 +201,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) @@ -201,7 +201,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget)
201 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget->combo[1]), renderer, TRUE); 201 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget->combo[1]), renderer, TRUE);
202 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget->combo[1]), renderer, "text", 0, NULL); 202 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget->combo[1]), renderer, "text", 0, NULL);
203 203
204 - for(f=0;f<G_N_ELEMENTS(colortable);f++) 204 + for(f=0;f< (int) G_N_ELEMENTS(colortable);f++)
205 { 205 {
206 GtkTreeIter iter; 206 GtkTreeIter iter;
207 gtk_list_store_append((GtkListStore *) model,&iter); 207 gtk_list_store_append((GtkListStore *) model,&iter);
@@ -246,7 +246,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) @@ -246,7 +246,7 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget)
246 gtk_grid_set_column_spacing(opt,5); 246 gtk_grid_set_column_spacing(opt,5);
247 gtk_grid_set_row_spacing(opt,5); 247 gtk_grid_set_row_spacing(opt,5);
248 248
249 - for(f=0;f<G_N_ELEMENTS(comboLabel);f++) 249 + for(f=0;f< (int) G_N_ELEMENTS(comboLabel);f++)
250 { 250 {
251 GtkWidget *label = gtk_label_new_with_mnemonic(gettext(comboLabel[f])); 251 GtkWidget *label = gtk_label_new_with_mnemonic(gettext(comboLabel[f]));
252 gtk_misc_set_alignment(GTK_MISC(label),0,0.5); 252 gtk_misc_set_alignment(GTK_MISC(label),0,0.5);
@@ -336,7 +336,7 @@ LIB3270_EXPORT void v3270_host_select_set_session(V3270HostSelectWidget *widget, @@ -336,7 +336,7 @@ LIB3270_EXPORT void v3270_host_select_set_session(V3270HostSelectWidget *widget,
336 336
337 gtk_tree_model_get_value(model,&iter,1,&value); 337 gtk_tree_model_get_value(model,&iter,1,&value);
338 338
339 - if(g_value_get_int(&value) == (opt&LIB3270_OPTION_HOST_TYPE)) 339 + if(g_value_get_int(&value) == (int) (opt&LIB3270_OPTION_HOST_TYPE))
340 { 340 {
341 gtk_combo_box_set_active_iter(widget->combo[0],&iter); 341 gtk_combo_box_set_active_iter(widget->combo[0],&iter);
342 break; 342 break;
src/include/v3270.h
@@ -199,7 +199,7 @@ @@ -199,7 +199,7 @@
199 gchar * v3270_get_copy(GtkWidget *widget); 199 gchar * v3270_get_copy(GtkWidget *widget);
200 void v3270_set_copy(GtkWidget *widget, const gchar *text); 200 void v3270_set_copy(GtkWidget *widget, const gchar *text);
201 201
202 - int v3270_run_script(GtkWidget *widget, const gchar *script); 202 +// int v3270_run_script(GtkWidget *widget, const gchar *script);
203 203
204 gchar * v3270_get_text(GtkWidget *widget,int offset, int len); 204 gchar * v3270_get_text(GtkWidget *widget,int offset, int len);
205 gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all); 205 gchar * v3270_get_region(GtkWidget *widget, gint start_pos, gint end_pos, gboolean all);
src/testprogram/testprogram.c
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 35
36 /*---[ Implement ]----------------------------------------------------------------------------------*/ 36 /*---[ Implement ]----------------------------------------------------------------------------------*/
37 37
38 -static gboolean popup_menu(GtkWidget *widget, gboolean selected, gboolean online, GdkEventButton *event, gpointer user_data) { 38 +static gboolean popup_menu(GtkWidget *widget, G_GNUC_UNUSED gboolean selected, gboolean online, G_GNUC_UNUSED GdkEventButton *event, G_GNUC_UNUSED gpointer user_data) {
39 39
40 if(!online) 40 if(!online)
41 return FALSE; 41 return FALSE;
@@ -76,7 +76,7 @@ static gboolean popup_menu(GtkWidget *widget, gboolean selected, gboolean online @@ -76,7 +76,7 @@ static gboolean popup_menu(GtkWidget *widget, gboolean selected, gboolean online
76 76
77 } 77 }
78 78
79 -static void activate(GtkApplication* app, gpointer user_data) { 79 +static void activate(GtkApplication* app, G_GNUC_UNUSED gpointer user_data) {
80 80
81 /* 81 /*
82 const gchar * search[] = { 82 const gchar * search[] = {
@@ -91,7 +91,7 @@ static void activate(GtkApplication* app, gpointer user_data) { @@ -91,7 +91,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
91 91
92 GtkWidget * window = gtk_application_window_new(app); 92 GtkWidget * window = gtk_application_window_new(app);
93 GtkWidget * terminal = v3270_new(); 93 GtkWidget * terminal = v3270_new();
94 - gchar * filename = NULL; 94 +// gchar * filename = NULL;
95 GValue val = G_VALUE_INIT; 95 GValue val = G_VALUE_INIT;
96 96
97 const gchar *url = getenv("LIB3270_DEFAULT_HOST"); 97 const gchar *url = getenv("LIB3270_DEFAULT_HOST");
src/v3270/accessible.c
@@ -94,7 +94,7 @@ static void v3270_accessible_focus_event(AtkObject *obj, gboolean focus_in) @@ -94,7 +94,7 @@ static void v3270_accessible_focus_event(AtkObject *obj, gboolean focus_in)
94 atk_object_notify_state_change(focus_obj, ATK_STATE_FOCUSED, focus_in); 94 atk_object_notify_state_change(focus_obj, ATK_STATE_FOCUSED, focus_in);
95 } 95 }
96 96
97 -static AtkAttributeSet * v3270_accessible_get_attributes (AtkObject *obj) 97 +static AtkAttributeSet * v3270_accessible_get_attributes (G_GNUC_UNUSED AtkObject *obj)
98 { 98 {
99 AtkAttributeSet * attributes; 99 AtkAttributeSet * attributes;
100 AtkAttribute * toolkit = g_new(AtkAttribute, 1); 100 AtkAttribute * toolkit = g_new(AtkAttribute, 1);
@@ -107,7 +107,7 @@ static AtkAttributeSet * v3270_accessible_get_attributes (AtkObject *obj) @@ -107,7 +107,7 @@ static AtkAttributeSet * v3270_accessible_get_attributes (AtkObject *obj)
107 return attributes; 107 return attributes;
108 } 108 }
109 109
110 -static void v3270_accessible_initialize (AtkObject *obj, gpointer data) 110 +static void v3270_accessible_initialize (AtkObject *obj, G_GNUC_UNUSED gpointer data)
111 { 111 {
112 obj->role = ATK_ROLE_TEXT; 112 obj->role = ATK_ROLE_TEXT;
113 } 113 }
@@ -131,12 +131,12 @@ static void v3270_accessible_class_init(v3270AccessibleClass *klass) @@ -131,12 +131,12 @@ static void v3270_accessible_class_init(v3270AccessibleClass *klass)
131 */ 131 */
132 } 132 }
133 133
134 -static gint v3270_accessible_get_n_actions(AtkAction *action) 134 +static gint v3270_accessible_get_n_actions(G_GNUC_UNUSED AtkAction *action)
135 { 135 {
136 return 1; 136 return 1;
137 } 137 }
138 138
139 -static const gchar* v3270_accessible_action_get_name (AtkAction *action, gint i) 139 +static const gchar* v3270_accessible_action_get_name (G_GNUC_UNUSED AtkAction *action, gint i)
140 { 140 {
141 if (i != 0) 141 if (i != 0)
142 return NULL; 142 return NULL;
@@ -326,7 +326,7 @@ static void v3270_accessible_get_character_extents( AtkText *text, @@ -326,7 +326,7 @@ static void v3270_accessible_get_character_extents( AtkText *text,
326 326
327 } 327 }
328 328
329 -static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offset, AtkTextBoundary boundary_type, gint *start_offset, gint *end_offset) 329 +static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offset, AtkTextBoundary boundary_type, G_GNUC_UNUSED gint *start_offset, G_GNUC_UNUSED gint *end_offset)
330 { 330 {
331 GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); 331 GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text));
332 H3270 * host; 332 H3270 * host;
@@ -744,7 +744,7 @@ static gboolean v3270_accessible_grab_focus(AtkComponent *component) @@ -744,7 +744,7 @@ static gboolean v3270_accessible_grab_focus(AtkComponent *component)
744 return TRUE; 744 return TRUE;
745 } 745 }
746 746
747 -static AtkLayer v3270_accessible_get_layer (AtkComponent *component) 747 +static AtkLayer v3270_accessible_get_layer (G_GNUC_UNUSED AtkComponent *component)
748 { 748 {
749 return ATK_LAYER_WIDGET; 749 return ATK_LAYER_WIDGET;
750 } 750 }
@@ -838,7 +838,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id) @@ -838,7 +838,7 @@ void v3270_acessible_set_state(GtkAccessible *obj, LIB3270_MESSAGE id)
838 838
839 bits = GTK_V3270_ACCESSIBLE(obj)->state ^ state; 839 bits = GTK_V3270_ACCESSIBLE(obj)->state ^ state;
840 840
841 - for(f=0;f<G_N_ELEMENTS(table);f++) 841 + for(f=0;f< (int) G_N_ELEMENTS(table);f++)
842 { 842 {
843 if(bits & table[f].flag) 843 if(bits & table[f].flag)
844 { 844 {
src/v3270/charset.c
@@ -310,7 +310,7 @@ @@ -310,7 +310,7 @@
310 310
311 if(!error) 311 if(!error)
312 { 312 {
313 - for(i=0;i < G_N_ELEMENTS(text);i++) 313 + for(i=0;i < (int) G_N_ELEMENTS(text);i++)
314 { 314 {
315 if(!g_ascii_strcasecmp(str,text[i])) 315 if(!g_ascii_strcasecmp(str,text[i]))
316 return (lib3270_remap_scope) i; 316 return (lib3270_remap_scope) i;
@@ -322,7 +322,7 @@ @@ -322,7 +322,7 @@
322 return BOTH; 322 return BOTH;
323 } 323 }
324 324
325 - static void element_start(GMarkupParseContext *context, const gchar *element_name, const gchar **names,const gchar **values, struct parse *info, GError **error) 325 + static void element_start(G_GNUC_UNUSED GMarkupParseContext *context, const gchar *element_name, const gchar **names,const gchar **values, struct parse *info, GError **error)
326 { 326 {
327 if(!g_ascii_strcasecmp(element_name,"pw3270-remap")) 327 if(!g_ascii_strcasecmp(element_name,"pw3270-remap"))
328 { 328 {
@@ -412,7 +412,7 @@ @@ -412,7 +412,7 @@
412 } 412 }
413 413
414 414
415 - static void element_end(GMarkupParseContext *context, const gchar *element_name, struct parse *info, GError **error) 415 + static void element_end(G_GNUC_UNUSED GMarkupParseContext *context, G_GNUC_UNUSED const gchar *element_name, G_GNUC_UNUSED struct parse *info, G_GNUC_UNUSED GError **error)
416 { 416 {
417 } 417 }
418 418
src/v3270/iocallback.c
@@ -123,7 +123,7 @@ static void * static_AddSource(H3270 *session, int fd, LIB3270_IO_FLAG flag, voi @@ -123,7 +123,7 @@ static void * static_AddSource(H3270 *session, int fd, LIB3270_IO_FLAG flag, voi
123 return src; 123 return src;
124 } 124 }
125 125
126 -static void static_RemoveSource(H3270 *session, void *id) 126 +static void static_RemoveSource(G_GNUC_UNUSED H3270 *session, void *id)
127 { 127 {
128 if(id) 128 if(id)
129 g_source_destroy((GSource *) id); 129 g_source_destroy((GSource *) id);
@@ -148,12 +148,12 @@ static void * static_AddTimeOut(H3270 *session, unsigned long interval, void (*c @@ -148,12 +148,12 @@ static void * static_AddTimeOut(H3270 *session, unsigned long interval, void (*c
148 return t; 148 return t;
149 } 149 }
150 150
151 -static void static_RemoveTimeOut(H3270 *session, void * timer) 151 +static void static_RemoveTimeOut(G_GNUC_UNUSED H3270 *session, void * timer)
152 { 152 {
153 ((TIMER *) timer)->remove++; 153 ((TIMER *) timer)->remove++;
154 } 154 }
155 155
156 -static gboolean IO_prepare(GSource *source, gint *timeout) 156 +static gboolean IO_prepare(G_GNUC_UNUSED GSource *source, G_GNUC_UNUSED gint *timeout)
157 { 157 {
158 /* 158 /*
159 * Called before all the file descriptors are polled. 159 * Called before all the file descriptors are polled.
@@ -221,7 +221,7 @@ static gboolean IO_check(GSource *source) @@ -221,7 +221,7 @@ static gboolean IO_check(GSource *source)
221 return FALSE; 221 return FALSE;
222 } 222 }
223 223
224 -static gboolean IO_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) 224 +static gboolean IO_dispatch(GSource *source, G_GNUC_UNUSED GSourceFunc callback, G_GNUC_UNUSED gpointer user_data)
225 { 225 {
226 /* 226 /*
227 * Called to dispatch the event source, 227 * Called to dispatch the event source,
@@ -239,12 +239,12 @@ static gboolean IO_dispatch(GSource *source, GSourceFunc callback, gpointer user @@ -239,12 +239,12 @@ static gboolean IO_dispatch(GSource *source, GSourceFunc callback, gpointer user
239 return TRUE; 239 return TRUE;
240 } 240 }
241 241
242 -static void IO_finalize(GSource *source) 242 +static void IO_finalize(G_GNUC_UNUSED GSource *source)
243 { 243 {
244 244
245 } 245 }
246 246
247 -static gboolean IO_closure(gpointer data) 247 +static gboolean IO_closure(G_GNUC_UNUSED gpointer data)
248 { 248 {
249 return 0; 249 return 0;
250 } 250 }
@@ -266,7 +266,7 @@ gpointer BgCall(struct bgParameter *p) @@ -266,7 +266,7 @@ gpointer BgCall(struct bgParameter *p)
266 return 0; 266 return 0;
267 } 267 }
268 268
269 -static int static_Sleep(H3270 *hSession, int seconds) 269 +static int static_Sleep(G_GNUC_UNUSED H3270 *hSession, int seconds)
270 { 270 {
271 time_t end = time(0) + seconds; 271 time_t end = time(0) + seconds;
272 272
@@ -276,7 +276,7 @@ static int static_Sleep(H3270 *hSession, int seconds) @@ -276,7 +276,7 @@ static int static_Sleep(H3270 *hSession, int seconds)
276 return 0; 276 return 0;
277 } 277 }
278 278
279 -static int static_RunPendingEvents(H3270 *hSession, int wait) 279 +static int static_RunPendingEvents(G_GNUC_UNUSED H3270 *hSession, int wait)
280 { 280 {
281 int rc = 0; 281 int rc = 0;
282 while(gtk_events_pending()) 282 while(gtk_events_pending())
@@ -291,12 +291,12 @@ static int static_RunPendingEvents(H3270 *hSession, int wait) @@ -291,12 +291,12 @@ static int static_RunPendingEvents(H3270 *hSession, int wait)
291 return rc; 291 return rc;
292 } 292 }
293 293
294 -static void beep(H3270 *session) 294 +static void beep(G_GNUC_UNUSED H3270 *session)
295 { 295 {
296 - gdk_beep(); 296 + gdk_display_beep(gdk_display_get_default());
297 } 297 }
298 298
299 -void v3270_register_io_handlers(v3270Class *cls) 299 +void v3270_register_io_handlers(G_GNUC_UNUSED v3270Class *cls)
300 { 300 {
301 static const struct lib3270_callbacks hdl = 301 static const struct lib3270_callbacks hdl =
302 { 302 {
src/v3270/keyboard.c
@@ -150,7 +150,7 @@ @@ -150,7 +150,7 @@
150 } 150 }
151 } 151 }
152 152
153 - for(f=0; f < G_N_ELEMENTS(keycode);f++) 153 + for(f=0; f < (int) G_N_ELEMENTS(keycode);f++)
154 { 154 {
155 if(keycode[f].keyval == event->keyval && state == keycode[f].state) 155 if(keycode[f].keyval == event->keyval && state == keycode[f].state)
156 { 156 {
@@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
178 178
179 gtk_accelerator_parse(key_name,&keyval,&state); 179 gtk_accelerator_parse(key_name,&keyval,&state);
180 180
181 - for(f=0; f < G_N_ELEMENTS(keycode);f++) 181 + for(f=0; f < (int) G_N_ELEMENTS(keycode);f++)
182 { 182 {
183 if(keycode[f].keyval == keyval && keycode[f].state == state) 183 if(keycode[f].keyval == keyval && keycode[f].state == state)
184 { 184 {
@@ -257,7 +257,7 @@ @@ -257,7 +257,7 @@
257 257
258 } 258 }
259 259
260 - void v3270_key_commit(GtkIMContext *imcontext, gchar *str, v3270 *widget) 260 + void v3270_key_commit(G_GNUC_UNUSED GtkIMContext *imcontext, gchar *str, v3270 *widget)
261 { 261 {
262 gchar *utf = g_convert((char *) str, -1, lib3270_get_display_charset(widget->host), "UTF-8", NULL, NULL, NULL); 262 gchar *utf = g_convert((char *) str, -1, lib3270_get_display_charset(widget->host), "UTF-8", NULL, NULL, NULL);
263 263
src/v3270/macros.c
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
35 35
36 /*--[ Implement ]------------------------------------------------------------------------------------*/ 36 /*--[ Implement ]------------------------------------------------------------------------------------*/
37 37
  38 +/*
38 static int v3270_macro_copy(GtkWidget *widget, int argc, const char **argv) 39 static int v3270_macro_copy(GtkWidget *widget, int argc, const char **argv)
39 { 40 {
40 v3270_copy(widget, V3270_SELECT_TEXT, FALSE); 41 v3270_copy(widget, V3270_SELECT_TEXT, FALSE);
@@ -125,3 +126,5 @@ @@ -125,3 +126,5 @@
125 return 0; 126 return 0;
126 } 127 }
127 128
  129 +*/
  130 +
src/v3270/mouse.c
@@ -132,7 +132,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event) @@ -132,7 +132,7 @@ void v3270_emit_popup(v3270 *widget, int baddr, GdkEventButton *event)
132 if(handled) 132 if(handled)
133 return; 133 return;
134 134
135 - gdk_beep(); 135 + gdk_display_beep(gdk_display_get_default());
136 } 136 }
137 137
138 static V3270_OIA_FIELD get_field_from_event(v3270 *widget, GdkEventButton *event) 138 static V3270_OIA_FIELD get_field_from_event(v3270 *widget, GdkEventButton *event)
@@ -200,7 +200,7 @@ gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event) @@ -200,7 +200,7 @@ gboolean v3270_button_release_event(GtkWidget *widget, GdkEventButton*event)
200 &handled); 200 &handled);
201 201
202 if(!handled) 202 if(!handled)
203 - gdk_beep(); 203 + gdk_display_beep(gdk_display_get_default());
204 204
205 } 205 }
206 206
src/v3270/oia.c
@@ -137,7 +137,7 @@ static gint draw_spinner(cairo_t *cr, GdkRectangle *r, GdkRGBA *color, gint step @@ -137,7 +137,7 @@ static gint draw_spinner(cairo_t *cr, GdkRectangle *r, GdkRGBA *color, gint step
137 } 137 }
138 #endif // HAVE_LIBM 138 #endif // HAVE_LIBM
139 139
140 -static void setup_cursor_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 140 +static void setup_cursor_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, G_GNUC_UNUSED GdkRGBA *color)
141 { 141 {
142 rect->width = metrics->width * 8; 142 rect->width = metrics->width * 8;
143 rect->x -= rect->width; 143 rect->x -= rect->width;
@@ -149,7 +149,7 @@ static void setup_cursor_position(GdkRectangle *rect, v3270FontInfo *metrics, ca @@ -149,7 +149,7 @@ static void setup_cursor_position(GdkRectangle *rect, v3270FontInfo *metrics, ca
149 } 149 }
150 } 150 }
151 151
152 -static void setup_ticking_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 152 +static void setup_ticking_position(GdkRectangle *rect, G_GNUC_UNUSED v3270FontInfo *metrics, cairo_t *cr, G_GNUC_UNUSED H3270 *host, G_GNUC_UNUSED int cols, G_GNUC_UNUSED GdkRGBA *color)
153 { 153 {
154 char buffer[7]; 154 char buffer[7];
155 cairo_text_extents_t extents; 155 cairo_text_extents_t extents;
@@ -164,14 +164,14 @@ static void setup_ticking_position(GdkRectangle *rect, v3270FontInfo *metrics, c @@ -164,14 +164,14 @@ static void setup_ticking_position(GdkRectangle *rect, v3270FontInfo *metrics, c
164 rect->x -= rect->width; 164 rect->x -= rect->width;
165 } 165 }
166 166
167 -static void setup_spinner_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 167 +static void setup_spinner_position(GdkRectangle *rect, G_GNUC_UNUSED v3270FontInfo *metrics, G_GNUC_UNUSED cairo_t *cr, G_GNUC_UNUSED H3270 *host, G_GNUC_UNUSED int cols, G_GNUC_UNUSED GdkRGBA *color)
168 { 168 {
169 rect->width = rect->height; 169 rect->width = rect->height;
170 rect->x -= rect->width; 170 rect->x -= rect->width;
171 // draw_spinner(cr,rect,color,0); 171 // draw_spinner(cr,rect,color,0);
172 } 172 }
173 173
174 -static void setup_luname_position(GdkRectangle *rect, v3270FontInfo *font, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 174 +static void setup_luname_position(GdkRectangle *rect, v3270FontInfo *font, cairo_t *cr, H3270 *host, G_GNUC_UNUSED int cols, GdkRGBA *color)
175 { 175 {
176 const char *luname = lib3270_get_luname(host); 176 const char *luname = lib3270_get_luname(host);
177 177
@@ -201,19 +201,21 @@ static void setup_luname_position(GdkRectangle *rect, v3270FontInfo *font, cairo @@ -201,19 +201,21 @@ static void setup_luname_position(GdkRectangle *rect, v3270FontInfo *font, cairo
201 201
202 } 202 }
203 203
204 -static void setup_single_char_right(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 204 +static void setup_single_char_right(GdkRectangle *rect, G_GNUC_UNUSED v3270FontInfo *metrics, G_GNUC_UNUSED cairo_t *cr, G_GNUC_UNUSED H3270 *host, G_GNUC_UNUSED int cols, G_GNUC_UNUSED GdkRGBA *color)
205 { 205 {
206 rect->x -= rect->width; 206 rect->x -= rect->width;
207 207
  208 + /*
208 #ifdef DEBUG 209 #ifdef DEBUG
209 cairo_set_source_rgb(cr,0.1,0.1,0.1); 210 cairo_set_source_rgb(cr,0.1,0.1,0.1);
210 cairo_rectangle(cr, rect->x, rect->y, rect->width, rect->height); 211 cairo_rectangle(cr, rect->x, rect->y, rect->width, rect->height);
211 cairo_fill(cr); 212 cairo_fill(cr);
212 #endif 213 #endif
  214 +*/
213 215
214 } 216 }
215 217
216 -static void setup_insert_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 218 +static void setup_insert_position(GdkRectangle *rect, G_GNUC_UNUSED v3270FontInfo *metrics, cairo_t *cr, G_GNUC_UNUSED H3270 *host, G_GNUC_UNUSED int cols, G_GNUC_UNUSED GdkRGBA *color)
217 { 219 {
218 if(rect->width > rect->height) 220 if(rect->width > rect->height)
219 { 221 {
@@ -237,7 +239,7 @@ static void setup_insert_position(GdkRectangle *rect, v3270FontInfo *metrics, ca @@ -237,7 +239,7 @@ static void setup_insert_position(GdkRectangle *rect, v3270FontInfo *metrics, ca
237 239
238 240
239 241
240 -static void setup_double_char_position(GdkRectangle *rect, v3270FontInfo *metrics, cairo_t *cr, H3270 *host, int cols, GdkRGBA *color) 242 +static void setup_double_char_position(GdkRectangle *rect, G_GNUC_UNUSED v3270FontInfo *metrics, cairo_t *cr, G_GNUC_UNUSED H3270 *host, G_GNUC_UNUSED int cols, G_GNUC_UNUSED GdkRGBA *color)
241 { 243 {
242 rect->width <<= 1; 244 rect->width <<= 1;
243 rect->x -= rect->width; 245 rect->x -= rect->width;
@@ -339,7 +341,7 @@ static void draw_xbm(cairo_t *cr, GdkRectangle *rect, int width, int height, uns @@ -339,7 +341,7 @@ static void draw_xbm(cairo_t *cr, GdkRectangle *rect, int width, int height, uns
339 cairo_restore(cr); 341 cairo_restore(cr);
340 } 342 }
341 343
342 -void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, v3270FontInfo *metrics, GdkRGBA *color, GdkRectangle *rect) 344 +void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, G_GNUC_UNUSED v3270FontInfo *metrics, GdkRGBA *color, GdkRectangle *rect)
343 { 345 {
344 #ifdef DEBUG 346 #ifdef DEBUG
345 cairo_set_source_rgb(cr,0.1,0.1,0.1); 347 cairo_set_source_rgb(cr,0.1,0.1,0.1);
@@ -587,7 +589,7 @@ void v3270_draw_oia(cairo_t *cr, H3270 *host, int row, int cols, v3270FontInfo * @@ -587,7 +589,7 @@ void v3270_draw_oia(cairo_t *cr, H3270 *host, int row, int cols, v3270FontInfo *
587 cairo_rectangle(cr, metrics->left, row, cols*metrics->width, metrics->spacing); 589 cairo_rectangle(cr, metrics->left, row, cols*metrics->width, metrics->spacing);
588 cairo_fill(cr); 590 cairo_fill(cr);
589 591
590 - for(f=0;f<G_N_ELEMENTS(right);f++) 592 + for(f=0;f< (int) G_N_ELEMENTS(right);f++)
591 { 593 {
592 GdkRectangle *r = rect+right[f].id; 594 GdkRectangle *r = rect+right[f].id;
593 595
@@ -843,7 +845,7 @@ static void release_timer(struct timer_info *info) @@ -843,7 +845,7 @@ static void release_timer(struct timer_info *info)
843 gdk_cairo_set_source_rgba(cr,info->terminal->color+V3270_COLOR_OIA_BACKGROUND); 845 gdk_cairo_set_source_rgba(cr,info->terminal->color+V3270_COLOR_OIA_BACKGROUND);
844 #endif 846 #endif
845 847
846 - for(f=0;f<G_N_ELEMENTS(id);f++) 848 + for(f=0;f< (int) G_N_ELEMENTS(id);f++)
847 { 849 {
848 GdkRectangle *rect = info->terminal->oia_rect + id[f]; 850 GdkRectangle *rect = info->terminal->oia_rect + id[f];
849 cairo_rectangle(cr, rect->x, rect->y, rect->width, rect->height); 851 cairo_rectangle(cr, rect->x, rect->y, rect->width, rect->height);
@@ -1071,7 +1073,7 @@ void v3270_stop_timer(GtkWidget *widget) @@ -1071,7 +1073,7 @@ void v3270_stop_timer(GtkWidget *widget)
1071 1073
1072 } 1074 }
1073 1075
1074 -void v3270_update_ssl(H3270 *session, LIB3270_SSL_STATE state) 1076 +void v3270_update_ssl(H3270 *session, G_GNUC_UNUSED LIB3270_SSL_STATE state)
1075 { 1077 {
1076 v3270 * terminal = GTK_V3270(lib3270_get_user_data(session)); 1078 v3270 * terminal = GTK_V3270(lib3270_get_user_data(session));
1077 cairo_t * cr; 1079 cairo_t * cr;
src/v3270/security.c
@@ -279,7 +279,7 @@ @@ -279,7 +279,7 @@
279 279
280 /*--[ Implement ]------------------------------------------------------------------------------------*/ 280 /*--[ Implement ]------------------------------------------------------------------------------------*/
281 281
282 - G_GNUC_INTERNAL const struct v3270_ssl_status_msg * v3270_get_ssl_status_msg(GtkWidget *widget) 282 + G_GNUC_INTERNAL const struct v3270_ssl_status_msg * v3270_get_ssl_status_msg(G_GNUC_UNUSED GtkWidget *widget)
283 { 283 {
284 #ifdef HAVE_LIBSSL 284 #ifdef HAVE_LIBSSL
285 int f; 285 int f;
src/v3270/selection.c
@@ -50,11 +50,11 @@ @@ -50,11 +50,11 @@
50 50
51 /*--[ Implement ]------------------------------------------------------------------------------------*/ 51 /*--[ Implement ]------------------------------------------------------------------------------------*/
52 52
53 -static void clipboard_clear(GtkClipboard *clipboard, GObject *obj) 53 +static void clipboard_clear(G_GNUC_UNUSED GtkClipboard *clipboard, G_GNUC_UNUSED GObject *obj)
54 { 54 {
55 } 55 }
56 56
57 -static void clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection, guint target, GObject *obj) 57 +static void clipboard_get(G_GNUC_UNUSED GtkClipboard *clipboard, GtkSelectionData *selection, guint target, GObject *obj)
58 { 58 {
59 v3270 * widget = GTK_V3270(obj); 59 v3270 * widget = GTK_V3270(obj);
60 60
@@ -372,7 +372,7 @@ LIB3270_EXPORT void v3270_paste(GtkWidget *widget) @@ -372,7 +372,7 @@ LIB3270_EXPORT void v3270_paste(GtkWidget *widget)
372 372
373 #else 373 #else
374 374
375 -static void text_received(GtkClipboard *clipboard, const gchar *text, GtkWidget *widget) 375 +static void text_received(G_GNUC_UNUSED GtkClipboard *clipboard, const gchar *text, GtkWidget *widget)
376 { 376 {
377 v3270_paste_string(widget,text,"UTF-8"); 377 v3270_paste_string(widget,text,"UTF-8");
378 } 378 }
@@ -401,7 +401,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod @@ -401,7 +401,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod
401 if(!buffer) 401 if(!buffer)
402 { 402 {
403 /* Conversion failed, update special chars and try again */ 403 /* Conversion failed, update special chars and try again */
404 - int f; 404 + size_t f;
405 405
406 static const struct _xlat 406 static const struct _xlat
407 { 407 {
@@ -460,7 +460,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod @@ -460,7 +460,7 @@ void v3270_paste_string(GtkWidget *widget, const gchar *text, const gchar *encod
460 GTK_DIALOG_DESTROY_WITH_PARENT, 460 GTK_DIALOG_DESTROY_WITH_PARENT,
461 GTK_MESSAGE_ERROR, 461 GTK_MESSAGE_ERROR,
462 GTK_BUTTONS_OK, 462 GTK_BUTTONS_OK,
463 - _( "Can't convert line %d from %s to %s" ),f+1, encoding, charset); 463 + _( "Can't convert line %lu from %s to %s" ),(unsigned long) (f+1), encoding, charset);
464 464
465 gtk_window_set_title(GTK_WINDOW(dialog), _( "Charset error" ) ); 465 gtk_window_set_title(GTK_WINDOW(dialog), _( "Charset error" ) );
466 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),"%s\n%s",error->message, ln[f]); 466 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),"%s\n%s",error->message, ln[f]);
src/v3270/widget.c
@@ -129,11 +129,11 @@ static void v3270_cursor_draw(v3270 *widget) @@ -129,11 +129,11 @@ static void v3270_cursor_draw(v3270 *widget)
129 } 129 }
130 130
131 131
132 -static void v3270_toggle_changed(v3270 *widget,LIB3270_TOGGLE toggle_id, gboolean toggle_state,const gchar *toggle_name) 132 +static void v3270_toggle_changed(G_GNUC_UNUSED v3270 *widget, G_GNUC_UNUSED LIB3270_TOGGLE toggle_id, G_GNUC_UNUSED gboolean toggle_state, G_GNUC_UNUSED const gchar *toggle_name)
133 { 133 {
134 } 134 }
135 135
136 -static void loghandler(H3270 *session, const char *module, int rc, const char *fmt, va_list args) 136 +static void loghandler(G_GNUC_UNUSED H3270 *session, const char *module, int rc, const char *fmt, va_list args)
137 { 137 {
138 g_logv(module,rc ? G_LOG_LEVEL_WARNING : G_LOG_LEVEL_MESSAGE, fmt, args); 138 g_logv(module,rc ? G_LOG_LEVEL_WARNING : G_LOG_LEVEL_MESSAGE, fmt, args);
139 } 139 }
@@ -226,7 +226,7 @@ void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type , const gchar *t @@ -226,7 +226,7 @@ void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type , const gchar *t
226 226
227 } 227 }
228 228
229 -gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_tooltip, GtkTooltip *tooltip) 229 +gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, G_GNUC_UNUSED gboolean keyboard_tooltip, GtkTooltip *tooltip)
230 { 230 {
231 if(y >= GTK_V3270(widget)->oia_rect->y) 231 if(y >= GTK_V3270(widget)->oia_rect->y)
232 { 232 {
@@ -638,7 +638,7 @@ void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, int width, int heig @@ -638,7 +638,7 @@ void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, int width, int heig
638 terminal->font.left = (width >> 1) - ((size) >> 1); 638 terminal->font.left = (width >> 1) - ((size) >> 1);
639 639
640 terminal->font.spacing = height / (rows+2); 640 terminal->font.spacing = height / (rows+2);
641 - if(terminal->font.spacing < hFont) 641 + if((int) terminal->font.spacing < hFont)
642 terminal->font.spacing = hFont; 642 terminal->font.spacing = hFont;
643 643
644 size = CONTENTS_HEIGHT(terminal); 644 size = CONTENTS_HEIGHT(terminal);
@@ -658,7 +658,7 @@ static void set_timer(H3270 *session, unsigned char on) @@ -658,7 +658,7 @@ static void set_timer(H3270 *session, unsigned char on)
658 658
659 } 659 }
660 660
661 -static void update_toggle(H3270 *session, LIB3270_TOGGLE ix, unsigned char value, LIB3270_TOGGLE_TYPE reason, const char *name) 661 +static void update_toggle(H3270 *session, LIB3270_TOGGLE ix, unsigned char value, G_GNUC_UNUSED LIB3270_TOGGLE_TYPE reason, const char *name)
662 { 662 {
663 GtkWidget *widget = GTK_WIDGET(lib3270_get_user_data(session)); 663 GtkWidget *widget = GTK_WIDGET(lib3270_get_user_data(session));
664 664
@@ -766,9 +766,6 @@ static void ctlr_done(H3270 *session) @@ -766,9 +766,6 @@ static void ctlr_done(H3270 *session)
766 766
767 static void update_connect(H3270 *session, unsigned char connected) 767 static void update_connect(H3270 *session, unsigned char connected)
768 { 768 {
769 -#ifdef DEBUG  
770 - char dbg[1024];  
771 -#endif // DEBUG  
772 v3270 *widget = GTK_V3270(lib3270_get_user_data(session)); 769 v3270 *widget = GTK_V3270(lib3270_get_user_data(session));
773 770
774 if(connected) 771 if(connected)
@@ -790,13 +787,13 @@ static void update_connect(H3270 *session, unsigned char connected) @@ -790,13 +787,13 @@ static void update_connect(H3270 *session, unsigned char connected)
790 gtk_widget_queue_draw(GTK_WIDGET(widget)); 787 gtk_widget_queue_draw(GTK_WIDGET(widget));
791 } 788 }
792 789
793 -static void update_screen_size(H3270 *session,unsigned short rows, unsigned short cols) 790 +static void update_screen_size(H3270 *session, G_GNUC_UNUSED unsigned short rows, G_GNUC_UNUSED unsigned short cols)
794 { 791 {
795 v3270_reload(GTK_WIDGET(lib3270_get_user_data(session))); 792 v3270_reload(GTK_WIDGET(lib3270_get_user_data(session)));
796 gtk_widget_queue_draw(GTK_WIDGET(lib3270_get_user_data(session))); 793 gtk_widget_queue_draw(GTK_WIDGET(lib3270_get_user_data(session)));
797 } 794 }
798 795
799 -static void update_model(H3270 *session, const char *name, int model, int rows, int cols) 796 +static void update_model(H3270 *session, const char *name, int model, G_GNUC_UNUSED int rows, G_GNUC_UNUSED int cols)
800 { 797 {
801 if(v3270_properties.model) 798 if(v3270_properties.model)
802 g_object_notify_by_pspec(G_OBJECT(lib3270_get_user_data(session)), v3270_properties.model); 799 g_object_notify_by_pspec(G_OBJECT(lib3270_get_user_data(session)), v3270_properties.model);
@@ -862,7 +859,7 @@ static void set_selection(H3270 *session, unsigned char status) @@ -862,7 +859,7 @@ static void set_selection(H3270 *session, unsigned char status)
862 859
863 } 860 }
864 861
865 -static void update_selection(H3270 *session, int start, int end) 862 +static void update_selection(H3270 *session, G_GNUC_UNUSED int start, G_GNUC_UNUSED int end)
866 { 863 {
867 // Selected region changed 864 // Selected region changed
868 GtkWidget * widget = GTK_WIDGET(lib3270_get_user_data(session)); 865 GtkWidget * widget = GTK_WIDGET(lib3270_get_user_data(session));
@@ -902,8 +899,8 @@ static void release_activity_timer(v3270 *widget) @@ -902,8 +899,8 @@ static void release_activity_timer(v3270 *widget)
902 widget->activity.timer = NULL; 899 widget->activity.timer = NULL;
903 } 900 }
904 901
905 -static int popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list args)  
906 - { 902 +static void popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list args)
  903 +{
907 GtkWidget *terminal = (GtkWidget *) lib3270_get_user_data(session); 904 GtkWidget *terminal = (GtkWidget *) lib3270_get_user_data(session);
908 905
909 if(terminal && GTK_IS_V3270(terminal)) { 906 if(terminal && GTK_IS_V3270(terminal)) {
@@ -921,7 +918,6 @@ static int popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title, @@ -921,7 +918,6 @@ static int popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title,
921 918
922 } 919 }
923 920
924 - return 0;  
925 } 921 }
926 922
927 const gchar * v3270_default_font = "monospace"; 923 const gchar * v3270_default_font = "monospace";
@@ -1395,7 +1391,7 @@ void v3270_set_color_table(GdkRGBA *table, const gchar *colors) @@ -1395,7 +1391,7 @@ void v3270_set_color_table(GdkRGBA *table, const gchar *colors)
1395 { 1391 {
1396 gchar **clr; 1392 gchar **clr;
1397 guint cnt; 1393 guint cnt;
1398 - int f; 1394 + guint f;
1399 1395
1400 if(strchr(colors,':')) 1396 if(strchr(colors,':'))
1401 clr = g_strsplit(colors,":",V3270_COLOR_COUNT+1); 1397 clr = g_strsplit(colors,":",V3270_COLOR_COUNT+1);
src/v3270ft/load.c
@@ -51,7 +51,7 @@ static LIB3270_FT_OPTION getFlagByName(const gchar *option, const char *optval) @@ -51,7 +51,7 @@ static LIB3270_FT_OPTION getFlagByName(const gchar *option, const char *optval)
51 51
52 if(!g_ascii_strcasecmp(key,ft_option[f].name)) { 52 if(!g_ascii_strcasecmp(key,ft_option[f].name)) {
53 rc = ft_option[f].opt; 53 rc = ft_option[f].opt;
54 - debug("%s=%08lx",key,(unsigned int) rc); 54 + // debug("%s=%08lx",key,(unsigned int) rc);
55 break; 55 break;
56 } 56 }
57 57
@@ -62,7 +62,7 @@ static LIB3270_FT_OPTION getFlagByName(const gchar *option, const char *optval) @@ -62,7 +62,7 @@ static LIB3270_FT_OPTION getFlagByName(const gchar *option, const char *optval)
62 return rc; 62 return rc;
63 } 63 }
64 64
65 -static void entry_start(GMarkupParseContext *context, const gchar *element_name, const gchar **names,const gchar **values, struct v3270ft_entry *info, GError **error) { 65 +static void entry_start(G_GNUC_UNUSED GMarkupParseContext *context, const gchar *element_name, const gchar **names,const gchar **values, struct v3270ft_entry *info, GError **error) {
66 66
67 int f; 67 int f;
68 68
@@ -208,7 +208,7 @@ static void element_start(GMarkupParseContext *context, const gchar *element_nam @@ -208,7 +208,7 @@ static void element_start(GMarkupParseContext *context, const gchar *element_nam
208 208
209 } 209 }
210 210
211 -static void element_end(GMarkupParseContext *context, const gchar *element_name, void *info, GError **error) { 211 +static void element_end(GMarkupParseContext *context, const gchar *element_name, G_GNUC_UNUSED void *info,G_GNUC_UNUSED GError **error) {
212 212
213 if(!(g_ascii_strcasecmp(element_name,"entry") && g_ascii_strcasecmp(element_name,"file"))) { 213 if(!(g_ascii_strcasecmp(element_name,"entry") && g_ascii_strcasecmp(element_name,"file"))) {
214 214
@@ -224,7 +224,7 @@ static void element_end(GMarkupParseContext *context, const gchar *element_name, @@ -224,7 +224,7 @@ static void element_end(GMarkupParseContext *context, const gchar *element_name,
224 224
225 } 225 }
226 226
227 -static void validate_item(struct v3270ft_entry *entry, GError *error) { 227 +static void validate_item(struct v3270ft_entry *entry, G_GNUC_UNUSED GError *error) {
228 v3270ft_update_state(entry); 228 v3270ft_update_state(entry);
229 } 229 }
230 230
src/v3270ft/select.c
@@ -72,7 +72,7 @@ static gpointer select_file(struct file *fl) { @@ -72,7 +72,7 @@ static gpointer select_file(struct file *fl) {
72 72
73 #endif // _WIN32 73 #endif // _WIN32
74 74
75 -gchar * v3270ft_select_file(v3270ft *dialog, const gchar *title, const gchar *button, GtkFileChooserAction action, const gchar *filename, const gchar *filter, ...) { 75 +gchar * v3270ft_select_file(v3270ft *dialog, const gchar *title, const gchar *button, GtkFileChooserAction action, G_GNUC_UNUSED const gchar *filename, G_GNUC_UNUSED const gchar *filter, ...) {
76 76
77 gchar *rc = NULL; 77 gchar *rc = NULL;
78 78
src/v3270ft/transfer.c
@@ -36,13 +36,13 @@ @@ -36,13 +36,13 @@
36 36
37 /*--[ Implement ]------------------------------------------------------------------------------------*/ 37 /*--[ Implement ]------------------------------------------------------------------------------------*/
38 38
39 -static gboolean transfer_mapped(GtkWidget *widget, GdkEvent *event, v3270ft *ft) { 39 +static gboolean transfer_mapped(GtkWidget *widget, G_GNUC_UNUSED GdkEvent *event, v3270ft *ft) {
40 v3270ftprogress_set_transfer(widget,ft->active->data); 40 v3270ftprogress_set_transfer(widget,ft->active->data);
41 v3270ftprogress_start_transfer(widget); 41 v3270ftprogress_start_transfer(widget);
42 return TRUE; 42 return TRUE;
43 } 43 }
44 44
45 -static void transfer_complete(GtkWidget *progress, const gchar *primary, const gchar *secondary, v3270ft *ft) { 45 +static void transfer_complete(GtkWidget *progress, G_GNUC_UNUSED const gchar *primary, G_GNUC_UNUSED const gchar *secondary, v3270ft *ft) {
46 46
47 debug("%s",__FUNCTION__); 47 debug("%s",__FUNCTION__);
48 48
src/v3270ft/v3270ft.c
@@ -138,32 +138,32 @@ static void remote_file_changed(GtkEntry *widget, v3270ft *dialog) { @@ -138,32 +138,32 @@ static void remote_file_changed(GtkEntry *widget, v3270ft *dialog) {
138 138
139 } 139 }
140 140
141 -static void start_transfer(GtkButton *button, v3270ft *dialog) { 141 +static void start_transfer(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
142 gtk_dialog_response(GTK_DIALOG(dialog),GTK_RESPONSE_APPLY); 142 gtk_dialog_response(GTK_DIALOG(dialog),GTK_RESPONSE_APPLY);
143 } 143 }
144 144
145 -static void select_first(GtkButton *button, v3270ft *dialog) { 145 +static void select_first(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
146 v3270ft_select_first(GTK_WIDGET(dialog)); 146 v3270ft_select_first(GTK_WIDGET(dialog));
147 } 147 }
148 148
149 -static void select_last(GtkButton *button, v3270ft *dialog) { 149 +static void select_last(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
150 v3270ft_select_last(GTK_WIDGET(dialog)); 150 v3270ft_select_last(GTK_WIDGET(dialog));
151 } 151 }
152 152
153 -static void select_previous(GtkButton *button, v3270ft *dialog) { 153 +static void select_previous(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
154 v3270ft_select_previous(GTK_WIDGET(dialog)); 154 v3270ft_select_previous(GTK_WIDGET(dialog));
155 } 155 }
156 156
157 -static void select_next(GtkButton *button, v3270ft *dialog) { 157 +static void select_next(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
158 v3270ft_select_next(GTK_WIDGET(dialog)); 158 v3270ft_select_next(GTK_WIDGET(dialog));
159 } 159 }
160 160
161 -static void insert_file(GtkButton *button, v3270ft *dialog) { 161 +static void insert_file(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
162 dialog->files = g_list_append(dialog->files,v3270ft_create_entry()); 162 dialog->files = g_list_append(dialog->files,v3270ft_create_entry());
163 v3270ft_select_last(GTK_WIDGET(dialog)); 163 v3270ft_select_last(GTK_WIDGET(dialog));
164 } 164 }
165 165
166 -static void remove_file(GtkButton *button, v3270ft *dialog) { 166 +static void remove_file(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
167 167
168 GList *next = dialog->active->next; 168 GList *next = dialog->active->next;
169 169
@@ -186,7 +186,7 @@ static void remove_file(GtkButton *button, v3270ft *dialog) { @@ -186,7 +186,7 @@ static void remove_file(GtkButton *button, v3270ft *dialog) {
186 186
187 } 187 }
188 188
189 -static void load_file(GtkButton *button, v3270ft *dialog) { 189 +static void load_file(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
190 190
191 gchar * filename = v3270ft_select_file( 191 gchar * filename = v3270ft_select_file(
192 dialog, 192 dialog,
@@ -205,7 +205,7 @@ static void load_file(GtkButton *button, v3270ft *dialog) { @@ -205,7 +205,7 @@ static void load_file(GtkButton *button, v3270ft *dialog) {
205 205
206 } 206 }
207 207
208 -static void save_file(GtkButton *button, v3270ft *dialog) { 208 +static void save_file(G_GNUC_UNUSED GtkButton *button, v3270ft *dialog) {
209 209
210 gchar * filename = v3270ft_select_file( 210 gchar * filename = v3270ft_select_file(
211 dialog, 211 dialog,
@@ -223,7 +223,7 @@ static void save_file(GtkButton *button, v3270ft *dialog) { @@ -223,7 +223,7 @@ static void save_file(GtkButton *button, v3270ft *dialog) {
223 223
224 } 224 }
225 225
226 -static void option_toggled(GtkToggleButton *togglebutton, v3270ft *ft) { 226 +static void option_toggled(G_GNUC_UNUSED GtkToggleButton *togglebutton, v3270ft *ft) {
227 227
228 struct v3270ft_entry * entry = v3270ft_get_selected(ft); 228 struct v3270ft_entry * entry = v3270ft_get_selected(ft);
229 229
@@ -273,7 +273,7 @@ static void spin_changed(GtkWidget *button, v3270ft *ft) { @@ -273,7 +273,7 @@ static void spin_changed(GtkWidget *button, v3270ft *ft) {
273 273
274 } 274 }
275 275
276 -static gboolean spin_format(GtkSpinButton *spin, gpointer data) { 276 +static gboolean spin_format(GtkSpinButton *spin, G_GNUC_UNUSED gpointer data) {
277 277
278 GtkAdjustment * adjustment = gtk_spin_button_get_adjustment (spin); 278 GtkAdjustment * adjustment = gtk_spin_button_get_adjustment (spin);
279 int value = (int)gtk_adjustment_get_value(adjustment); 279 int value = (int)gtk_adjustment_get_value(adjustment);
@@ -292,7 +292,7 @@ static gboolean spin_format(GtkSpinButton *spin, gpointer data) { @@ -292,7 +292,7 @@ static gboolean spin_format(GtkSpinButton *spin, gpointer data) {
292 #ifdef WIN32 292 #ifdef WIN32
293 static void select_local_file(GtkButton *button, v3270ft *dialog) { 293 static void select_local_file(GtkButton *button, v3270ft *dialog) {
294 #else 294 #else
295 -static void icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent *event, v3270ft *dialog) { 295 +static void icon_press(G_GNUC_UNUSED GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_pos, G_GNUC_UNUSED GdkEvent *event, v3270ft *dialog) {
296 #endif // WIN32 296 #endif // WIN32
297 297
298 gchar *filename = v3270ft_select_file( 298 gchar *filename = v3270ft_select_file(
@@ -322,7 +322,7 @@ static void icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent @@ -322,7 +322,7 @@ static void icon_press(GtkEntry *entry, GtkEntryIconPosition icon_pos, GdkEvent
322 322
323 } 323 }
324 324
325 -static void drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time) { 325 +static void drag_data_received(GtkWidget *widget, GdkDragContext *context, G_GNUC_UNUSED gint x, G_GNUC_UNUSED gint y, GtkSelectionData *data, G_GNUC_UNUSED guint info, guint time) {
326 326
327 gtk_drag_finish(context, v3270ft_append_selection(widget, data) > 0, FALSE, time); 327 gtk_drag_finish(context, v3270ft_append_selection(widget, data) > 0, FALSE, time);
328 328
@@ -479,7 +479,7 @@ static void v3270ft_init(v3270ft *dialog) { @@ -479,7 +479,7 @@ static void v3270ft_init(v3270ft *dialog) {
479 #if HAVE_GTK_HEADER_BAR 479 #if HAVE_GTK_HEADER_BAR
480 widget = gtk_dialog_get_header_bar(GTK_DIALOG(dialog)); 480 widget = gtk_dialog_get_header_bar(GTK_DIALOG(dialog));
481 481
482 - for(f=0;f<G_N_ELEMENTS(action);f++) { 482 + for(f=0;f< (int) G_N_ELEMENTS(action);f++) {
483 483
484 GtkWidget *button = gtk_button_new_from_icon_name(action[f].name,GTK_ICON_SIZE_BUTTON); 484 GtkWidget *button = gtk_button_new_from_icon_name(action[f].name,GTK_ICON_SIZE_BUTTON);
485 485
@@ -589,7 +589,7 @@ static void v3270ft_init(v3270ft *dialog) { @@ -589,7 +589,7 @@ static void v3270ft_init(v3270ft *dialog) {
589 gtk_entry_set_max_length(dialog->remote,PATH_MAX); 589 gtk_entry_set_max_length(dialog->remote,PATH_MAX);
590 gtk_grid_attach(grid,GTK_WIDGET(dialog->remote),1,2,1,1); 590 gtk_grid_attach(grid,GTK_WIDGET(dialog->remote),1,2,1,1);
591 591
592 - for(f=0;f<G_N_ELEMENTS(label);f++) { 592 + for(f=0;f< (int) G_N_ELEMENTS(label);f++) {
593 GtkWidget * widget = gtk_label_new_with_mnemonic(gettext(label[f])); 593 GtkWidget * widget = gtk_label_new_with_mnemonic(gettext(label[f]));
594 gtk_widget_set_halign(widget,GTK_ALIGN_START); 594 gtk_widget_set_halign(widget,GTK_ALIGN_START);
595 gtk_widget_set_valign(widget,GTK_ALIGN_CENTER); 595 gtk_widget_set_valign(widget,GTK_ALIGN_CENTER);
src/v3270ft/v3270ftprogress.c
@@ -401,7 +401,7 @@ static GtkWidget * create_label(int id, GtkWidget *entry) { @@ -401,7 +401,7 @@ static GtkWidget * create_label(int id, GtkWidget *entry) {
401 return widget; 401 return widget;
402 } 402 }
403 403
404 -static void cancel_clicked(GtkButton *button,v3270ftprogress *dialog) { 404 +static void cancel_clicked(G_GNUC_UNUSED GtkButton *button,v3270ftprogress *dialog) {
405 405
406 debug("%s",__FUNCTION__); 406 debug("%s",__FUNCTION__);
407 407
@@ -697,7 +697,7 @@ static void ft_complete(H3270 *hSession, unsigned long length,double kbytes_sec, @@ -697,7 +697,7 @@ static void ft_complete(H3270 *hSession, unsigned long length,double kbytes_sec,
697 697
698 } 698 }
699 699
700 -static void ft_message(H3270 *hSession, const char *text, void *widget){ 700 +static void ft_message(G_GNUC_UNUSED H3270 *hSession, const char *text, void *widget){
701 701
702 debug("%s(%s,%p)",__FUNCTION__,text,widget); 702 debug("%s(%s,%p)",__FUNCTION__,text,widget);
703 703
@@ -706,19 +706,19 @@ static void ft_message(H3270 *hSession, const char *text, void *widget){ @@ -706,19 +706,19 @@ static void ft_message(H3270 *hSession, const char *text, void *widget){
706 } 706 }
707 } 707 }
708 708
709 -static void ft_update(H3270 *hSession, unsigned long current, unsigned long total, double kbytes_sec, void *widget) { 709 +static void ft_update(G_GNUC_UNUSED H3270 *hSession, unsigned long current, unsigned long total, double kbytes_sec, void *widget) {
710 710
711 if(widget) { 711 if(widget) {
712 v3270ftprogress_update(GTK_WIDGET(widget), current, total, kbytes_sec); 712 v3270ftprogress_update(GTK_WIDGET(widget), current, total, kbytes_sec);
713 } 713 }
714 } 714 }
715 715
716 -static void ft_running(H3270 *hSession, int is_cut, void *widget) { 716 +static void ft_running(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED int is_cut, void *widget) {
717 debug("%s",__FUNCTION__); 717 debug("%s",__FUNCTION__);
718 GTK_V3270FTPROGRESS(widget)->timeout = time(NULL)+10; 718 GTK_V3270FTPROGRESS(widget)->timeout = time(NULL)+10;
719 } 719 }
720 720
721 -static void ft_aborting(H3270 *hSession, void *widget) { 721 +static void ft_aborting(G_GNUC_UNUSED H3270 *hSession, void *widget) {
722 722
723 if(widget) { 723 if(widget) {
724 v3270ftprogress_set_header(GTK_WIDGET(widget),_("Aborting transfer")); 724 v3270ftprogress_set_header(GTK_WIDGET(widget),_("Aborting transfer"));
@@ -726,7 +726,7 @@ static void ft_aborting(H3270 *hSession, void *widget) { @@ -726,7 +726,7 @@ static void ft_aborting(H3270 *hSession, void *widget) {
726 726
727 } 727 }
728 728
729 -static void ft_state_changed(H3270 *hSession, LIB3270_FT_STATE state, const char *text, void *widget) { 729 +static void ft_state_changed(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED LIB3270_FT_STATE state, const char *text, void *widget) {
730 730
731 if(widget) { 731 if(widget) {
732 v3270ftprogress_set_header(GTK_WIDGET(widget),gettext(text)); 732 v3270ftprogress_set_header(GTK_WIDGET(widget),gettext(text));