Commit e4ef72e39a4f4c05cae44ebb9821f75062431a7b

Authored by Perry Werneck
1 parent 12af8421

Ajustes para eliminar warnings que apareceram na atualização do gcc para windows.

src/include/lib3270/log.h
@@ -59,9 +59,11 @@ @@ -59,9 +59,11 @@
59 59
60 #ifdef DEBUG 60 #ifdef DEBUG
61 #include <stdio.h> 61 #include <stdio.h>
  62 + #undef trace
62 #define trace( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); 63 #define trace( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr);
63 #define debug( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); 64 #define debug( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr);
64 #else 65 #else
  66 + #undef trace
65 #define trace(x, ...) // __VA_ARGS__ 67 #define trace(x, ...) // __VA_ARGS__
66 #define debug(x, ...) // __VA_ARGS__ 68 #define debug(x, ...) // __VA_ARGS__
67 #endif 69 #endif
src/lib3270/ctlr.c
@@ -437,7 +437,7 @@ LIB3270_EXPORT int lib3270_get_field_start(H3270 *hSession, int baddr) @@ -437,7 +437,7 @@ LIB3270_EXPORT int lib3270_get_field_start(H3270 *hSession, int baddr)
437 return -1; 437 return -1;
438 438
439 if(baddr < 0) 439 if(baddr < 0)
440 - baddr = hSession->cursor_addr; 440 + baddr = hSession->cursor_addr;
441 441
442 sbaddr = baddr; 442 sbaddr = baddr;
443 do 443 do
@@ -462,8 +462,8 @@ LIB3270_EXPORT int lib3270_get_field_len(H3270 *hSession, int baddr) @@ -462,8 +462,8 @@ LIB3270_EXPORT int lib3270_get_field_len(H3270 *hSession, int baddr)
462 if (!hSession->formatted) 462 if (!hSession->formatted)
463 return -1; 463 return -1;
464 464
465 - if(baddr < 0)  
466 - baddr = hSession->cursor_addr; 465 + if(baddr < 0)
  466 + baddr = hSession->cursor_addr;
467 467
468 addr = find_field_attribute(hSession,baddr); 468 addr = find_field_attribute(hSession,baddr);
469 469
@@ -569,8 +569,8 @@ LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0) @@ -569,8 +569,8 @@ LIB3270_EXPORT int lib3270_get_next_unprotected(H3270 *hSession, int baddr0)
569 569
570 CHECK_SESSION_HANDLE(hSession); 570 CHECK_SESSION_HANDLE(hSession);
571 571
572 - if(baddr0 < 0)  
573 - baddr0 = hSession->cursor_addr; 572 + if(baddr0 < 0)
  573 + baddr0 = hSession->cursor_addr;
574 574
575 nbaddr = baddr0; 575 nbaddr = baddr0;
576 do 576 do
@@ -594,7 +594,7 @@ LIB3270_EXPORT int lib3270_get_is_protected(H3270 *hSession, int baddr) @@ -594,7 +594,7 @@ LIB3270_EXPORT int lib3270_get_is_protected(H3270 *hSession, int baddr)
594 CHECK_SESSION_HANDLE(hSession); 594 CHECK_SESSION_HANDLE(hSession);
595 595
596 if(baddr < 0) 596 if(baddr < 0)
597 - baddr = hSession->cursor_addr; 597 + baddr = hSession->cursor_addr;
598 598
599 int faddr = find_field_attribute(hSession,baddr); 599 int faddr = find_field_attribute(hSession,baddr);
600 600
src/plugins/hllapi/pluginmain.c
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 71
72 /*--[ Globals ]--------------------------------------------------------------------------------------*/ 72 /*--[ Globals ]--------------------------------------------------------------------------------------*/
73 73
74 - static const gchar control_char = '@'; 74 +// static const gchar control_char = '@';
75 75
76 /*--[ Implement ]------------------------------------------------------------------------------------*/ 76 /*--[ Implement ]------------------------------------------------------------------------------------*/
77 77
src/pw3270/actions.c
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 #include <lib3270/selection.h> 41 #include <lib3270/selection.h>
42 #include <lib3270/trace.h> 42 #include <lib3270/trace.h>
43 #include <lib3270/macros.h> 43 #include <lib3270/macros.h>
  44 + #include <lib3270/log.h>
44 #include <stdlib.h> 45 #include <stdlib.h>
45 46
46 #ifdef DEBUG 47 #ifdef DEBUG