Commit 98a5c1a5cf20e57d6fe7d8e5f7ac17ca80a72d09
1 parent
4032a2e6
Exists in
master
and in
1 other branch
Fixing warnings.
Showing
6 changed files
with
24 additions
and
19 deletions
Show diff stats
src/dialogs/print/print.c
... | ... | @@ -306,8 +306,8 @@ V3270PrintOperation * v3270_print_operation_new(GtkWidget *widget, LIB3270_PRINT |
306 | 306 | |
307 | 307 | case LIB3270_PRINT_SELECTED: |
308 | 308 | { |
309 | - int row, col; | |
310 | - int baddr = 0; | |
309 | + unsigned int row, col; | |
310 | + unsigned int baddr = 0; | |
311 | 311 | |
312 | 312 | GdkRectangle rect; |
313 | 313 | memset(&rect,0,sizeof(rect)); |
... | ... | @@ -340,12 +340,12 @@ V3270PrintOperation * v3270_print_operation_new(GtkWidget *widget, LIB3270_PRINT |
340 | 340 | |
341 | 341 | operation->contents.text = g_new0(column *, operation->contents.height+1); |
342 | 342 | |
343 | - for(row = rect.y; row < rect.width; row++) | |
343 | + for(row = rect.y; ((int) row) < rect.width; row++) | |
344 | 344 | { |
345 | 345 | int c = 0; |
346 | 346 | operation->contents.text[r++] = text = g_new0(column, operation->contents.width); |
347 | 347 | |
348 | - for(col = rect.x; col < rect.height; col++) | |
348 | + for(col = rect.x; ((int) col) < rect.height; col++) | |
349 | 349 | { |
350 | 350 | lib3270_get_element(operation->session,lib3270_translate_to_address(operation->session,row,col),&text[c].c,&text[c].attr); |
351 | 351 | if(!(text[c].attr & LIB3270_ATTR_SELECTED)) | ... | ... |
src/dialogs/transfer.c
... | ... | @@ -42,13 +42,13 @@ |
42 | 42 | |
43 | 43 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
44 | 44 | |
45 | -static void header_on_state_changed(GtkWidget *worker, guint state, const gchar *msg, GtkDialog *dialog) | |
45 | +static void header_on_state_changed(GtkWidget G_GNUC_UNUSED(*worker), guint G_GNUC_UNUSED(state), const gchar *msg, GtkDialog *dialog) | |
46 | 46 | { |
47 | 47 | debug("%s(%s)",__FUNCTION__,msg); |
48 | 48 | gtk_header_bar_set_subtitle(GTK_HEADER_BAR(gtk_dialog_get_header_bar(dialog)),msg); |
49 | 49 | } |
50 | 50 | |
51 | -static void transfer_success(GtkWidget *worker, const gchar *msg, const gchar *description, GtkDialog *dialog) | |
51 | +static void transfer_success(GtkWidget G_GNUC_UNUSED(*worker), const gchar *msg, const gchar *description, GtkDialog *dialog) | |
52 | 52 | { |
53 | 53 | debug("%s(\"%s\",\"%s\")",__FUNCTION__,msg,description); |
54 | 54 | gtk_dialog_response(dialog,GTK_RESPONSE_OK); | ... | ... |
src/terminal/accessible.c
... | ... | @@ -310,9 +310,9 @@ static void v3270_accessible_get_character_extents( AtkText *text, |
310 | 310 | gint *height, |
311 | 311 | AtkCoordType coords ) |
312 | 312 | { |
313 | - v3270 * widget = (v3270 *) gtk_accessible_get_widget(GTK_ACCESSIBLE (text)); | |
314 | - int rows, cols; | |
315 | - GdkWindow * window; | |
313 | + v3270 * widget = (v3270 *) gtk_accessible_get_widget(GTK_ACCESSIBLE (text)); | |
314 | + unsigned int rows, cols; | |
315 | + GdkWindow * window; | |
316 | 316 | |
317 | 317 | if (widget == NULL) |
318 | 318 | return; |
... | ... | @@ -344,10 +344,10 @@ static void v3270_accessible_get_character_extents( AtkText *text, |
344 | 344 | |
345 | 345 | 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) |
346 | 346 | { |
347 | - GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); | |
348 | - H3270 * host; | |
349 | - char * text = NULL; | |
350 | - int rows,cols,pos; | |
347 | + GtkWidget * widget = gtk_accessible_get_widget(GTK_ACCESSIBLE (atk_text)); | |
348 | + H3270 * host; | |
349 | + char * text = NULL; | |
350 | + unsigned int rows,cols,pos; | |
351 | 351 | |
352 | 352 | if(!widget) |
353 | 353 | return NULL; |
... | ... | @@ -385,7 +385,7 @@ static gchar * v3270_accessible_get_text_at_offset(AtkText *atk_text, gint offse |
385 | 385 | case ATK_TEXT_BOUNDARY_LINE_START: // Boundary is the initial character of the content or a character immediately following a newline, |
386 | 386 | // linefeed, or return character. |
387 | 387 | pos = (offset/cols)*cols; |
388 | - if(pos == offset) | |
388 | + if( ((int) pos) == offset) | |
389 | 389 | offset++; |
390 | 390 | text = lib3270_get_string_at_address(host,pos,(offset-pos),'\n'); |
391 | 391 | break; | ... | ... |
src/terminal/draw.c
... | ... | @@ -375,7 +375,8 @@ LIB3270_EXPORT void v3270_reload(GtkWidget *widget) |
375 | 375 | gint height = gtk_widget_get_allocated_height(widget); |
376 | 376 | |
377 | 377 | GdkRectangle rect; |
378 | - int addr, cursor, r, rows, cols; | |
378 | + int addr, cursor; | |
379 | + unsigned int rows, cols, r; | |
379 | 380 | |
380 | 381 | cairo_t * cr; |
381 | 382 | |
... | ... | @@ -411,7 +412,7 @@ LIB3270_EXPORT void v3270_reload(GtkWidget *widget) |
411 | 412 | |
412 | 413 | for(r = 0; r < rows; r++) |
413 | 414 | { |
414 | - int c; | |
415 | + unsigned int c; | |
415 | 416 | |
416 | 417 | rect.x = terminal->font.left; |
417 | 418 | |
... | ... | @@ -447,7 +448,7 @@ void v3270_update_char(H3270 *session, int addr, unsigned char chr, unsigned sho |
447 | 448 | v3270 * terminal = GTK_V3270(lib3270_get_user_data(session)); |
448 | 449 | cairo_t * cr; |
449 | 450 | GdkRectangle rect; |
450 | - int rows,cols; | |
451 | + unsigned int rows,cols; | |
451 | 452 | |
452 | 453 | if(!(gtk_widget_get_realized(GTK_WIDGET(terminal)) && terminal->drawing)) |
453 | 454 | return; | ... | ... |
src/terminal/mouse.c
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | gint v3270_get_offset_at_point(v3270 *widget, gint x, gint y) |
49 | 49 | { |
50 | 50 | GdkPoint point; |
51 | - int r,c; | |
51 | + unsigned int r,c; | |
52 | 52 | |
53 | 53 | g_return_val_if_fail(widget->font.width > 0,-1); |
54 | 54 | |
... | ... | @@ -59,7 +59,7 @@ gint v3270_get_offset_at_point(v3270 *widget, gint x, gint y) |
59 | 59 | |
60 | 60 | lib3270_get_screen_size(widget->host,&r,&c); |
61 | 61 | |
62 | - if(point.x >= 0 && point.y >= 0 && point.x < c && point.y < r) | |
62 | + if(point.x >= 0 && point.y >= 0 && point.x < ((int) c) && point.y < ((int) r)) | |
63 | 63 | return (point.y * c) + point.x; |
64 | 64 | } |
65 | 65 | ... | ... |
src/testprogram/testprogram.c
... | ... | @@ -86,6 +86,7 @@ static gboolean popup_menu(GtkWidget *widget, G_GNUC_UNUSED gboolean selected, g |
86 | 86 | } |
87 | 87 | */ |
88 | 88 | |
89 | + /* | |
89 | 90 | static gboolean field_clicked(GtkWidget *widget, gboolean connected, V3270_OIA_FIELD field, GdkEventButton *event, GtkWidget *window) |
90 | 91 | { |
91 | 92 | trace("%s: %s field=%d event=%p window=%p",__FUNCTION__,connected ? "Connected" : "Disconnected", field, event, window); |
... | ... | @@ -103,7 +104,9 @@ static gboolean popup_menu(GtkWidget *widget, G_GNUC_UNUSED gboolean selected, g |
103 | 104 | |
104 | 105 | return FALSE; |
105 | 106 | } |
107 | + */ | |
106 | 108 | |
109 | + /* | |
107 | 110 | static void trace_window_destroy(G_GNUC_UNUSED GtkWidget *widget, H3270 *hSession) { |
108 | 111 | lib3270_set_toggle(hSession,LIB3270_TOGGLE_DS_TRACE,0); |
109 | 112 | lib3270_set_toggle(hSession,LIB3270_TOGGLE_SCREEN_TRACE,0); |
... | ... | @@ -111,6 +114,7 @@ static void trace_window_destroy(G_GNUC_UNUSED GtkWidget *widget, H3270 *hSessio |
111 | 114 | lib3270_set_toggle(hSession,LIB3270_TOGGLE_NETWORK_TRACE,0); |
112 | 115 | lib3270_set_toggle(hSession,LIB3270_TOGGLE_SSL_TRACE,0); |
113 | 116 | } |
117 | +*/ | |
114 | 118 | |
115 | 119 | |
116 | 120 | /* | ... | ... |