Commit 87aafe2c1f8ca24906acb556c188c703657e4e53

Authored by Perry Werneck
1 parent 4c9eaec1

Fixing windows build.

src/lib3270/init.c
@@ -119,7 +119,7 @@ int lib3270_unloaded(void) @@ -119,7 +119,7 @@ int lib3270_unloaded(void)
119 119
120 #if defined WIN32 120 #if defined WIN32
121 121
122 -BOOL WINAPI DllMain(HANDLE hinst unused, DWORD dwcallpurpose, LPVOID lpvResvd unused) 122 +BOOL WINAPI DllMain(HANDLE GNUC_UNUSED(hinst), DWORD dwcallpurpose, LPVOID GNUC_UNUSED(lpvResvd))
123 { 123 {
124 // Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); 124 // Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded");
125 125
src/lib3270/printer.c
@@ -106,8 +106,8 @@ static void printer_otimeout(H3270 *session); @@ -106,8 +106,8 @@ static void printer_otimeout(H3270 *session);
106 static void printer_etimeout(H3270 *session); 106 static void printer_etimeout(H3270 *session);
107 static void printer_dump(struct pr3o *p, Boolean is_err, Boolean is_dead); 107 static void printer_dump(struct pr3o *p, Boolean is_err, Boolean is_dead);
108 #endif /*]*/ 108 #endif /*]*/
109 -static void printer_host_connect(H3270 *session, int connected unused, void *dunno);  
110 -static void printer_exiting(H3270 *session, int b unused, void *dunno); 109 +static void printer_host_connect(H3270 *session, int connected, void *dunno);
  110 +static void printer_exiting(H3270 *session, int b, void *dunno);
111 111
112 /* Globals */ 112 /* Globals */
113 113
@@ -660,7 +660,7 @@ printer_stop(void) @@ -660,7 +660,7 @@ printer_stop(void)
660 660
661 /* The emulator is exiting. Make sure the printer session is cleaned up. */ 661 /* The emulator is exiting. Make sure the printer session is cleaned up. */
662 static void 662 static void
663 -printer_exiting(H3270 *session, int b unused, void *dunno) 663 +printer_exiting(H3270 *session, int GNUC_UNUSED(b), void *dunno)
664 { 664 {
665 printer_stop(); 665 printer_stop();
666 } 666 }
@@ -668,7 +668,7 @@ printer_exiting(H3270 *session, int b unused, void *dunno) @@ -668,7 +668,7 @@ printer_exiting(H3270 *session, int b unused, void *dunno)
668 #if defined(X3270_DISPLAY) /*[*/ 668 #if defined(X3270_DISPLAY) /*[*/
669 /* Callback for "OK" button on printer specific-LU popup */ 669 /* Callback for "OK" button on printer specific-LU popup */
670 static void 670 static void
671 -lu_callback(Widget w, XtPointer client_data, XtPointer call_data unused) 671 +lu_callback(Widget w, XtPointer client_data, XtPointer G_GNUC_UNUSED(call_data))
672 { 672 {
673 char *lu; 673 char *lu;
674 674
@@ -687,7 +687,7 @@ lu_callback(Widget w, XtPointer client_data, XtPointer call_data unused) @@ -687,7 +687,7 @@ lu_callback(Widget w, XtPointer client_data, XtPointer call_data unused)
687 687
688 /* Host connect/disconnect/3270-mode event. */ 688 /* Host connect/disconnect/3270-mode event. */
689 static void 689 static void
690 -printer_host_connect(H3270 *session, int connected unused, void *dunno) 690 +printer_host_connect(H3270 *session, int GNUC_UNUSED(connected), void *dunno)
691 { 691 {
692 if (IN_3270) { 692 if (IN_3270) {
693 char *printer_lu = appres.printer_lu; 693 char *printer_lu = appres.printer_lu;
src/lib3270/properties.c
@@ -653,7 +653,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_crl_text(H3270 *hSession) @@ -653,7 +653,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_crl_text(H3270 *hSession)
653 653
654 } 654 }
655 #else 655 #else
656 -LIB3270_EXPORT char * lib3270_get_ssl_crl_text(H3270 *hSession unused) 656 +LIB3270_EXPORT char * lib3270_get_ssl_crl_text(H3270 GNUC_UNUSED(*hSession))
657 { 657 {
658 return NULL; 658 return NULL;
659 } 659 }
src/lib3270/ssl/windows/getcrl.c
@@ -131,7 +131,7 @@ static size_t internal_curl_write_callback(void *contents, size_t size, size_t n @@ -131,7 +131,7 @@ static size_t internal_curl_write_callback(void *contents, size_t size, size_t n
131 return realsize; 131 return realsize;
132 } 132 }
133 133
134 -static int internal_curl_trace_callback(CURL *handle unused, curl_infotype type, char *data, size_t size, void *userp) 134 +static int internal_curl_trace_callback(CURL GNUC_UNUSED(*handle), curl_infotype type, char *data, size_t size, void *userp)
135 { 135 {
136 const char * text = NULL; 136 const char * text = NULL;
137 137
src/lib3270/toggles.c
@@ -340,25 +340,6 @@ static void toggle_keepalive(H3270 *session, struct lib3270_toggle GNUC_UNUSED(* @@ -340,25 +340,6 @@ static void toggle_keepalive(H3270 *session, struct lib3270_toggle GNUC_UNUSED(*
340 } 340 }
341 } 341 }
342 342
343 -/*  
344 -static void toggle_reconnect(H3270 *hSession, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE type )  
345 -{  
346 -  
347 - // If already connected or not interactive returns.  
348 - if(hSession->sock > 0 || type != TT_INTERACTIVE)  
349 - return;  
350 -  
351 - if(t->value && !hSession->auto_reconnect_inprogress)  
352 - {  
353 - // Schedule an automatic reconnection.  
354 - lib3270_write_log(hSession,"toggle","Auto-reconnect toggle was activated when offline, reconnecting");  
355 - hSession->auto_reconnect_inprogress = 1;  
356 - (void) AddTimer(RECONNECT_MS, hSession, lib3270_check_for_auto_reconnect);  
357 - }  
358 -  
359 -}  
360 -*/  
361 -  
362 /** 343 /**
363 * @brief Called from system initialization code to handle initial toggle settings. 344 * @brief Called from system initialization code to handle initial toggle settings.
364 */ 345 */
src/lib3270/windows/connect.c
@@ -59,8 +59,7 @@ @@ -59,8 +59,7 @@
59 /*---[ Implement ]-------------------------------------------------------------------------------*/ 59 /*---[ Implement ]-------------------------------------------------------------------------------*/
60 60
61 61
62 -//static void net_connected(H3270 *hSession)  
63 -static void net_connected(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused) 62 +static void net_connected(H3270 *hSession, int GNUC_UNUSED(fd), LIB3270_IO_FLAG GNUC_UNUSED(flag), void GNUC_UNUSED(*dunno))
64 { 63 {
65 int err; 64 int err;
66 socklen_t len = sizeof(err); 65 socklen_t len = sizeof(err);
src/lib3270/windows/util.c
@@ -194,7 +194,7 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void) @@ -194,7 +194,7 @@ LIB3270_EXPORT const char * lib3270_win32_local_charset(void)
194 #define SECS_BETWEEN_EPOCHS 11644473600ULL 194 #define SECS_BETWEEN_EPOCHS 11644473600ULL
195 #define SECS_TO_100NS 10000000ULL /* 10^7 */ 195 #define SECS_TO_100NS 10000000ULL /* 10^7 */
196 196
197 -int gettimeofday(struct timeval *tv, void *ignored unused) 197 +int gettimeofday(struct timeval *tv, void GNUC_UNUSED(*ignored))
198 { 198 {
199 FILETIME t; 199 FILETIME t;
200 ULARGE_INTEGER u; 200 ULARGE_INTEGER u;