diff --git a/Makefile.in b/Makefile.in index df8566e..5734289 100644 --- a/Makefile.in +++ b/Makefile.in @@ -136,10 +136,12 @@ clean: \ cleanDebug: @rm -fr $(BINDBG) + @$(MAKE) -C src/lib3270 $@ cleanRelease: @rm -fr $(BINRLS) + @$(MAKE) -C src/lib3270 $@ clean: \ cleanDebug \ diff --git a/src/include/lib3270/popup.h b/src/include/lib3270/popup.h index 4db2a28..192c045 100644 --- a/src/include/lib3270/popup.h +++ b/src/include/lib3270/popup.h @@ -51,7 +51,7 @@ LIB3270_NOTIFY_USER /**< Reserved, always the last one */ } LIB3270_NOTIFY; - LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, int (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); + LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, void (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); /** * Pop up an error dialog, based on an error number. diff --git a/src/lib3270/macros.c b/src/lib3270/macros.c index 41ea30d..697e47b 100644 --- a/src/lib3270/macros.c +++ b/src/lib3270/macros.c @@ -78,7 +78,7 @@ DECLARE_XLAT_STATE( LIB3270_CONNECTED_TN3270E ) }; - int f; + size_t f; LIB3270_CSTATE state = lib3270_get_connection_state(h); diff --git a/src/lib3270/options.c b/src/lib3270/options.c index 45ed145..678db5a 100644 --- a/src/lib3270/options.c +++ b/src/lib3270/options.c @@ -35,7 +35,7 @@ /*---[ Statics ]--------------------------------------------------------------------------------------------------------------*/ - static const const LIB3270_OPTION_ENTRY host_type[] = + static const LIB3270_OPTION_ENTRY host_type[] = { { LIB3270_OPTION_S390, @@ -164,7 +164,7 @@ LIB3270_EXPORT LIB3270_OPTION lib3270_parse_host_type(const char *name) LIB3270_EXPORT int lib3270_set_host_type(H3270 *hSession, const char *name) { - int f; + size_t f; for(f=0;f<(sizeof(host_type)/sizeof(host_type[0]));f++) { diff --git a/src/lib3270/screen.c b/src/lib3270/screen.c index 374295c..62ac4c7 100644 --- a/src/lib3270/screen.c +++ b/src/lib3270/screen.c @@ -601,7 +601,7 @@ void status_lu(H3270 *session, const char *lu) } -static void status_connect(H3270 *hSession, int connected, void *dunno) +static void status_connect(H3270 *hSession, int connected, void *dunno unused) { LIB3270_MESSAGE id = LIB3270_MESSAGE_USER; @@ -627,7 +627,7 @@ static void status_connect(H3270 *hSession, int connected, void *dunno) } -static void status_3270_mode(H3270 *hSession, int ignored unused, void *dunno) +static void status_3270_mode(H3270 *hSession, int ignored unused, void *dunno unused) { Boolean oia_boxsolid = (IN_3270 && !IN_SSCP); @@ -646,7 +646,7 @@ static void status_printer(H3270 *session, int on, void *dunno) } */ -void status_timing(H3270 *session, struct timeval *t0, struct timeval *t1) +void status_timing(H3270 *session unused, struct timeval *t0 unused, struct timeval *t1 unused) { } diff --git a/src/lib3270/selection.c b/src/lib3270/selection.c index 81888cc..c562747 100644 --- a/src/lib3270/selection.c +++ b/src/lib3270/selection.c @@ -165,7 +165,7 @@ static void update_selected_region(H3270 *session) } -void toggle_rectselect(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) +void toggle_rectselect(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused) { if(!session->selected) return; @@ -667,7 +667,7 @@ char * cut_text(H3270 *hSession, char tok) int sattr; /* Source addr attribute */ char *text; size_t maxlen = hSession->rows * hSession->cols; - int f; + size_t f; get_selected_addr(hSession,&daddr,&end); diff --git a/src/lib3270/session.c b/src/lib3270/session.c index f1cfd32..c826f50 100644 --- a/src/lib3270/session.c +++ b/src/lib3270/session.c @@ -57,7 +57,7 @@ void lib3270_session_free(H3270 *h) { - int f; + size_t f; if(!h) return; @@ -110,39 +110,39 @@ void lib3270_session_free(H3270 *h) } -static void update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor) +static void update_char(H3270 *session unused, int addr unused, unsigned char chr unused, unsigned short attr unused, unsigned char cursor unused) { } -static void nop_char(H3270 *session, unsigned char chr) +static void nop_char(H3270 *session unused, unsigned char chr unused) { } -static void nop(H3270 *session) +static void nop(H3270 *session unused) { } -static void update_model(H3270 *session, const char *name, int model, int rows, int cols) +static void update_model(H3270 *session unused, const char *name unused, int model unused, int rows unused, int cols unused) { } -static void changed(H3270 *session, int bstart, int bend) +static void changed(H3270 *session unused, int bstart unused, int bend unused) { } -static void update_cursor(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr) +static void update_cursor(H3270 *session unused, unsigned short row unused, unsigned short col unused, unsigned char c unused, unsigned short attr unused) { } -static void update_oia(H3270 *session, LIB3270_FLAG id, unsigned char on) +static void update_oia(H3270 *session unused, LIB3270_FLAG id unused, unsigned char on unused) { } -static void update_selection(H3270 *session, int start, int end) +static void update_selection(H3270 *session unused, int start unused, int end unused) { } -static void set_cursor(H3270 *session, LIB3270_POINTER id) +static void set_cursor(H3270 *session unused, LIB3270_POINTER id unused) { } @@ -152,7 +152,7 @@ static int print(H3270 *session) return -1; } -static void message(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *msg, const char *text) +static void message(H3270 *session, LIB3270_NOTIFY id unused, const char *title, const char *msg, const char *text) { #ifdef ANDROID __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 #endif // ANDROID } -static int def_popup(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg) +static void def_popup(H3270 *session, LIB3270_NOTIFY type unused, const char *title, const char *msg, const char *fmt, va_list arg) { #ifdef ANDROID char *mask = xs_buffer("%s\n",fmt); @@ -176,20 +176,19 @@ static int def_popup(H3270 *session, LIB3270_NOTIFY type, const char *title, con lib3270_write_log(session,"popup","%s",msg); lib3270_write_va_log(session,"popup",fmt,arg); #endif // ANDROID - return 0; } -static void def_trace(H3270 *session, const char *fmt, va_list args) +static void def_trace(H3270 *session unused, const char *fmt, va_list args) { vfprintf(stdout,fmt,args); fflush(stdout); } -static void update_ssl(H3270 *session, LIB3270_SSL_STATE state) +static void update_ssl(H3270 *session unused, LIB3270_SSL_STATE state unused) { } -static void set_timer(H3270 *session, unsigned char on) +static void set_timer(H3270 *session unused, unsigned char on unused) { } @@ -199,7 +198,7 @@ static void screen_disp(H3270 *session) screen_update(session,0,session->rows*session->cols); } -static void nop_int(H3270 *session, int width) +static void nop_int(H3270 *session unused, int width unused) { return; } @@ -298,7 +297,7 @@ LIB3270_EXPORT LIB3270_TRACE_HANDLER lib3270_set_trace_handler(H3270 *session, L return ret; } -LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, int (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)) { +LIB3270_EXPORT void lib3270_set_popup_handler(H3270 *session, void (*handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)) { session->cbk.popup = handler ? handler : def_popup; } diff --git a/src/lib3270/sf.c b/src/lib3270/sf.c index 978a4e1..e23ea97 100644 --- a/src/lib3270/sf.c +++ b/src/lib3270/sf.c @@ -700,7 +700,7 @@ static void query_reply_start(H3270 *hSession) static void do_query_reply(H3270 *hSession, unsigned char code) { - int i; + size_t i; unsigned subindex = 0; Boolean more = False; @@ -758,7 +758,7 @@ static void do_qr_null(H3270 *hSession) static void do_qr_summary(H3270 *hSession) { - int i; + size_t i; const char *comma = ""; trace_ds(hSession,"> QueryReply(Summary("); diff --git a/src/lib3270/ssl.c b/src/lib3270/ssl.c index e8e39a2..cb9b079 100644 --- a/src/lib3270/ssl.c +++ b/src/lib3270/ssl.c @@ -322,7 +322,7 @@ int ssl_init(H3270 *hSession) "/etc/ssl/certs" }; - int f; + size_t f; for(f = 0;f < sizeof(ssldir) / sizeof(ssldir[0]);f++) { diff --git a/src/lib3270/telnet.c b/src/lib3270/telnet.c index 10f2901..48c40e2 100644 --- a/src/lib3270/telnet.c +++ b/src/lib3270/telnet.c @@ -988,7 +988,7 @@ LIB3270_EXPORT void lib3270_data_recv(H3270 *hSession, size_t nr, const unsigned * @param hSession Session handle * */ -void net_input(H3270 *hSession, int fd, LIB3270_IO_FLAG flag, void *dunno) +void net_input(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused) { // register unsigned char * cp; int nr; @@ -1307,9 +1307,9 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) case TELOPT_EOR: case TELOPT_TTYPE: case TELOPT_ECHO: -#if defined(X3270_TN3270E) /*[*/ +#if defined(X3270_TN3270E) case TELOPT_TN3270E: -#endif /*]*/ +#endif if (c != TELOPT_TN3270E || !hSession->non_tn3270e_host) { if (!hSession->hisopts[c]) { hSession->hisopts[c] = 1; @@ -1334,6 +1334,7 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) } break; } + default: dont_opt[2] = c; net_rawout(hSession,dont_opt, sizeof(dont_opt)); @@ -1953,7 +1954,7 @@ static int process_eor(H3270 *hSession) * net_exception * Called when there is an exceptional condition on the socket. */ -void net_exception(H3270 *session, int fd, LIB3270_IO_FLAG flag, void *dunno) +void net_exception(H3270 *session, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused) { CHECK_SESSION_HANDLE(session); diff --git a/src/lib3270/toggles.c b/src/lib3270/toggles.c index ef49d40..00b722e 100644 --- a/src/lib3270/toggles.c +++ b/src/lib3270/toggles.c @@ -287,13 +287,13 @@ LIB3270_EXPORT int lib3270_toggle(H3270 *session, LIB3270_TOGGLE ix) return (int) t->value; } -static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) +static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt unused) { if(!session->screen_alt) set_viewsize(session,t->value ? 24 : session->maxROWS,80); } -static void toggle_redraw(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt) +static void toggle_redraw(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused) { session->cbk.display(session); } @@ -301,7 +301,7 @@ static void toggle_redraw(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGG /* * No-op toggle. */ -static void toggle_nop(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE LIB3270_UNUSED(tt) ) +static void toggle_nop(H3270 *session unused, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused ) { } @@ -357,7 +357,7 @@ void shutdown_toggles(H3270 *session) #if defined(X3270_TRACE) static const LIB3270_TOGGLE disable_on_shutdown[] = {DS_TRACE, EVENT_TRACE, SCREEN_TRACE}; - int f; + size_t f; for(f=0;f< (sizeof(disable_on_shutdown)/sizeof(disable_on_shutdown[0])); f++) lib3270_set_toggle(session,disable_on_shutdown[f],0); -- libgit2 0.21.2