Commit 6dd1f8d61d30559997a3c4c7d80b46fd69223be0
1 parent
5ad00ade
Exists in
master
and in
3 other branches
Fixing warnings.
Showing
11 changed files
with
40 additions
and
38 deletions
Show diff stats
Makefile.in
src/include/lib3270/popup.h
| ... | ... | @@ -51,7 +51,7 @@ |
| 51 | 51 | LIB3270_NOTIFY_USER /**< Reserved, always the last one */ |
| 52 | 52 | } LIB3270_NOTIFY; |
| 53 | 53 | |
| 54 | - LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, int (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); | |
| 54 | + LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, void (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); | |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Pop up an error dialog, based on an error number. | ... | ... |
src/lib3270/macros.c
src/lib3270/options.c
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | |
| 36 | 36 | /*---[ Statics ]--------------------------------------------------------------------------------------------------------------*/ |
| 37 | 37 | |
| 38 | - static const const LIB3270_OPTION_ENTRY host_type[] = | |
| 38 | + static const LIB3270_OPTION_ENTRY host_type[] = | |
| 39 | 39 | { |
| 40 | 40 | { |
| 41 | 41 | LIB3270_OPTION_S390, |
| ... | ... | @@ -164,7 +164,7 @@ LIB3270_EXPORT LIB3270_OPTION lib3270_parse_host_type(const char *name) |
| 164 | 164 | |
| 165 | 165 | LIB3270_EXPORT int lib3270_set_host_type(H3270 *hSession, const char *name) |
| 166 | 166 | { |
| 167 | - int f; | |
| 167 | + size_t f; | |
| 168 | 168 | |
| 169 | 169 | for(f=0;f<(sizeof(host_type)/sizeof(host_type[0]));f++) |
| 170 | 170 | { | ... | ... |
src/lib3270/screen.c
| ... | ... | @@ -601,7 +601,7 @@ void status_lu(H3270 *session, const char *lu) |
| 601 | 601 | |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | -static void status_connect(H3270 *hSession, int connected, void *dunno) | |
| 604 | +static void status_connect(H3270 *hSession, int connected, void *dunno unused) | |
| 605 | 605 | { |
| 606 | 606 | LIB3270_MESSAGE id = LIB3270_MESSAGE_USER; |
| 607 | 607 | |
| ... | ... | @@ -627,7 +627,7 @@ static void status_connect(H3270 *hSession, int connected, void *dunno) |
| 627 | 627 | |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | -static void status_3270_mode(H3270 *hSession, int ignored unused, void *dunno) | |
| 630 | +static void status_3270_mode(H3270 *hSession, int ignored unused, void *dunno unused) | |
| 631 | 631 | { |
| 632 | 632 | Boolean oia_boxsolid = (IN_3270 && !IN_SSCP); |
| 633 | 633 | |
| ... | ... | @@ -646,7 +646,7 @@ static void status_printer(H3270 *session, int on, void *dunno) |
| 646 | 646 | } |
| 647 | 647 | */ |
| 648 | 648 | |
| 649 | -void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1) | |
| 649 | +void status_timing(H3270 *session unused, struct timeval *t0 unused, struct timeval *t1 unused) | |
| 650 | 650 | { |
| 651 | 651 | } |
| 652 | 652 | ... | ... |
src/lib3270/selection.c
| ... | ... | @@ -165,7 +165,7 @@ static void update_selected_region(H3270 *session) |
| 165 | 165 | |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) | |
| 168 | +void toggle_rectselect(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused) | |
| 169 | 169 | { |
| 170 | 170 | if(!session->selected) |
| 171 | 171 | return; |
| ... | ... | @@ -667,7 +667,7 @@ char * cut_text(H3270 *hSession, char tok) |
| 667 | 667 | int sattr; /* Source addr attribute */ |
| 668 | 668 | char *text; |
| 669 | 669 | size_t maxlen = hSession->rows * hSession->cols; |
| 670 | - int f; | |
| 670 | + size_t f; | |
| 671 | 671 | |
| 672 | 672 | get_selected_addr(hSession,&daddr,&end); |
| 673 | 673 | ... | ... |
src/lib3270/session.c
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | |
| 58 | 58 | void lib3270_session_free(H3270 *h) |
| 59 | 59 | { |
| 60 | - int f; | |
| 60 | + size_t f; | |
| 61 | 61 | |
| 62 | 62 | if(!h) |
| 63 | 63 | return; |
| ... | ... | @@ -110,39 +110,39 @@ void lib3270_session_free(H3270 *h) |
| 110 | 110 | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -static void update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor) | |
| 113 | +static void update_char(H3270 *session unused, int addr unused, unsigned char chr unused, unsigned short attr unused, unsigned char cursor unused) | |
| 114 | 114 | { |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | -static void nop_char(H3270 *session, unsigned char chr) | |
| 117 | +static void nop_char(H3270 *session unused, unsigned char chr unused) | |
| 118 | 118 | { |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | -static void nop(H3270 *session) | |
| 121 | +static void nop(H3270 *session unused) | |
| 122 | 122 | { |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | -static void update_model(H3270 *session, const char *name, int model, int rows, int cols) | |
| 125 | +static void update_model(H3270 *session unused, const char *name unused, int model unused, int rows unused, int cols unused) | |
| 126 | 126 | { |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | -static void changed(H3270 *session, int bstart, int bend) | |
| 129 | +static void changed(H3270 *session unused, int bstart unused, int bend unused) | |
| 130 | 130 | { |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | -static void update_cursor(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr) | |
| 133 | +static void update_cursor(H3270 *session unused, unsigned short row unused, unsigned short col unused, unsigned char c unused, unsigned short attr unused) | |
| 134 | 134 | { |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | -static void update_oia(H3270 *session, LIB3270_FLAG id, unsigned char on) | |
| 137 | +static void update_oia(H3270 *session unused, LIB3270_FLAG id unused, unsigned char on unused) | |
| 138 | 138 | { |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | -static void update_selection(H3270 *session, int start, int end) | |
| 141 | +static void update_selection(H3270 *session unused, int start unused, int end unused) | |
| 142 | 142 | { |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | -static void set_cursor(H3270 *session, LIB3270_POINTER id) | |
| 145 | +static void set_cursor(H3270 *session unused, LIB3270_POINTER id unused) | |
| 146 | 146 | { |
| 147 | 147 | } |
| 148 | 148 | |
| ... | ... | @@ -152,7 +152,7 @@ static int print(H3270 *session) |
| 152 | 152 | return -1; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | -static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *msg, const char *text) | |
| 155 | +static void message(H3270 *session, LIB3270_NOTIFY id unused, const char *title, const char *msg, const char *text) | |
| 156 | 156 | { |
| 157 | 157 | #ifdef ANDROID |
| 158 | 158 | __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "%s\n",title); |
| ... | ... | @@ -165,7 +165,7 @@ static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const |
| 165 | 165 | #endif // ANDROID |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -static int def_popup(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg) | |
| 168 | +static void def_popup(H3270 *session, LIB3270_NOTIFY type unused, const char *title, const char *msg, const char *fmt, va_list arg) | |
| 169 | 169 | { |
| 170 | 170 | #ifdef ANDROID |
| 171 | 171 | char *mask = xs_buffer("%s\n",fmt); |
| ... | ... | @@ -176,20 +176,19 @@ static int def_popup(H3270 *session, LIB3270_NOTIFY type, const char *title, con |
| 176 | 176 | lib3270_write_log(session,"popup","%s",msg); |
| 177 | 177 | lib3270_write_va_log(session,"popup",fmt,arg); |
| 178 | 178 | #endif // ANDROID |
| 179 | - return 0; | |
| 180 | 179 | } |
| 181 | 180 | |
| 182 | -static void def_trace(H3270 *session, const char *fmt, va_list args) | |
| 181 | +static void def_trace(H3270 *session unused, const char *fmt, va_list args) | |
| 183 | 182 | { |
| 184 | 183 | vfprintf(stdout,fmt,args); |
| 185 | 184 | fflush(stdout); |
| 186 | 185 | } |
| 187 | 186 | |
| 188 | -static void update_ssl(H3270 *session, LIB3270_SSL_STATE state) | |
| 187 | +static void update_ssl(H3270 *session unused, LIB3270_SSL_STATE state unused) | |
| 189 | 188 | { |
| 190 | 189 | } |
| 191 | 190 | |
| 192 | -static void set_timer(H3270 *session, unsigned char on) | |
| 191 | +static void set_timer(H3270 *session unused, unsigned char on unused) | |
| 193 | 192 | { |
| 194 | 193 | } |
| 195 | 194 | |
| ... | ... | @@ -199,7 +198,7 @@ static void screen_disp(H3270 *session) |
| 199 | 198 | screen_update(session,0,session->rows*session->cols); |
| 200 | 199 | } |
| 201 | 200 | |
| 202 | -static void nop_int(H3270 *session, int width) | |
| 201 | +static void nop_int(H3270 *session unused, int width unused) | |
| 203 | 202 | { |
| 204 | 203 | return; |
| 205 | 204 | } |
| ... | ... | @@ -298,7 +297,7 @@ LIB3270_EXPORT LIB3270_TRACE_HANDLER lib3270_set_trace_handler(H3270 *session, L |
| 298 | 297 | return ret; |
| 299 | 298 | } |
| 300 | 299 | |
| 301 | -LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, int (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)) { | |
| 300 | +LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, void (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)) { | |
| 302 | 301 | session->cbk.popup = handler ? handler : def_popup; |
| 303 | 302 | } |
| 304 | 303 | ... | ... |
src/lib3270/sf.c
| ... | ... | @@ -700,7 +700,7 @@ static void query_reply_start(H3270 *hSession) |
| 700 | 700 | |
| 701 | 701 | static void do_query_reply(H3270 *hSession, unsigned char code) |
| 702 | 702 | { |
| 703 | - int i; | |
| 703 | + size_t i; | |
| 704 | 704 | unsigned subindex = 0; |
| 705 | 705 | Boolean more = False; |
| 706 | 706 | |
| ... | ... | @@ -758,7 +758,7 @@ static void do_qr_null(H3270 *hSession) |
| 758 | 758 | |
| 759 | 759 | static void do_qr_summary(H3270 *hSession) |
| 760 | 760 | { |
| 761 | - int i; | |
| 761 | + size_t i; | |
| 762 | 762 | const char *comma = ""; |
| 763 | 763 | |
| 764 | 764 | trace_ds(hSession,"> QueryReply(Summary("); | ... | ... |
src/lib3270/ssl.c
src/lib3270/telnet.c
| ... | ... | @@ -988,7 +988,7 @@ LIB3270_EXPORT void lib3270_data_recv(H3270 *hSession, size_t nr, const unsigned |
| 988 | 988 | * @param hSession Session handle |
| 989 | 989 | * |
| 990 | 990 | */ |
| 991 | -void net_input(H3270 *hSession, int fd, LIB3270_IO_FLAG flag, void *dunno) | |
| 991 | +void net_input(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused) | |
| 992 | 992 | { |
| 993 | 993 | // register unsigned char * cp; |
| 994 | 994 | int nr; |
| ... | ... | @@ -1307,9 +1307,9 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) |
| 1307 | 1307 | case TELOPT_EOR: |
| 1308 | 1308 | case TELOPT_TTYPE: |
| 1309 | 1309 | case TELOPT_ECHO: |
| 1310 | -#if defined(X3270_TN3270E) /*[*/ | |
| 1310 | +#if defined(X3270_TN3270E) | |
| 1311 | 1311 | case TELOPT_TN3270E: |
| 1312 | -#endif /*]*/ | |
| 1312 | +#endif | |
| 1313 | 1313 | if (c != TELOPT_TN3270E || !hSession->non_tn3270e_host) { |
| 1314 | 1314 | if (!hSession->hisopts[c]) { |
| 1315 | 1315 | hSession->hisopts[c] = 1; |
| ... | ... | @@ -1334,6 +1334,7 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) |
| 1334 | 1334 | } |
| 1335 | 1335 | break; |
| 1336 | 1336 | } |
| 1337 | + | |
| 1337 | 1338 | default: |
| 1338 | 1339 | dont_opt[2] = c; |
| 1339 | 1340 | net_rawout(hSession,dont_opt, sizeof(dont_opt)); |
| ... | ... | @@ -1953,7 +1954,7 @@ static int process_eor(H3270 *hSession) |
| 1953 | 1954 | * net_exception |
| 1954 | 1955 | * Called when there is an exceptional condition on the socket. |
| 1955 | 1956 | */ |
| 1956 | -void net_exception(H3270 *session, int fd, LIB3270_IO_FLAG flag, void *dunno) | |
| 1957 | +void net_exception(H3270 *session, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused) | |
| 1957 | 1958 | { |
| 1958 | 1959 | CHECK_SESSION_HANDLE(session); |
| 1959 | 1960 | ... | ... |
src/lib3270/toggles.c
| ... | ... | @@ -287,13 +287,13 @@ LIB3270_EXPORT int lib3270_toggle(H3270 *session, LIB3270_TOGGLE ix) |
| 287 | 287 | return (int) t->value; |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | -static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) | |
| 290 | +static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt unused) | |
| 291 | 291 | { |
| 292 | 292 | if(!session->screen_alt) |
| 293 | 293 | set_viewsize(session,t->value ? 24 : session->maxROWS,80); |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | -static void toggle_redraw(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) | |
| 296 | +static void toggle_redraw(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused) | |
| 297 | 297 | { |
| 298 | 298 | session->cbk.display(session); |
| 299 | 299 | } |
| ... | ... | @@ -301,7 +301,7 @@ static void toggle_redraw(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGG |
| 301 | 301 | /* |
| 302 | 302 | * No-op toggle. |
| 303 | 303 | */ |
| 304 | -static void toggle_nop(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE LIB3270_UNUSED(tt) ) | |
| 304 | +static void toggle_nop(H3270 *session unused, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused ) | |
| 305 | 305 | { |
| 306 | 306 | } |
| 307 | 307 | |
| ... | ... | @@ -357,7 +357,7 @@ void shutdown_toggles(H3270 *session) |
| 357 | 357 | #if defined(X3270_TRACE) |
| 358 | 358 | static const LIB3270_TOGGLE disable_on_shutdown[] = {DS_TRACE, EVENT_TRACE, SCREEN_TRACE}; |
| 359 | 359 | |
| 360 | - int f; | |
| 360 | + size_t f; | |
| 361 | 361 | |
| 362 | 362 | for(f=0;f< (sizeof(disable_on_shutdown)/sizeof(disable_on_shutdown[0])); f++) |
| 363 | 363 | lib3270_set_toggle(session,disable_on_shutdown[f],0); | ... | ... |