|
----- Forwarded message from Gunnar Jensen <gunnar.jensen@bigfoot.com> ----- From: "Gunnar Jensen" <gunnar.jensen@bigfoot.com> Subject: FW: Report of problems found in ver 0.17.1 To: <mmadore@turbolinux.com> Cc: "Gunnar \(Jobbet\)" <gunnar@idnetsystem.se>, "\(Bigfoot\) Gunnar Jensen" <gunnar.jensen@bigfoot.com> Date: Mon, 4 Jun 2001 09:16:26 +0200 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Hi, I have tried to send this to the list, but it doesn't seem to arrive (at least I have not got it back in my mail). -----Original Message----- From: Gunnar Jensen [mailto:gunnar.jensen@bigfoot.com] Sent: den 3 juni 2001 20:08 To: LINUX5250@midrange.com Subject: Report of problems found in ver 0.17.1 Hi all, While enjoying myself with the task of porting linux code to Windows, I found some minor problems..... Here follows a list of source-code errors and/or problems needing a fix. Not all of them are serious, but I hate it when my compiler says anything but "WIN5250.exe - 0 error(s), 0 warning(s)" in the Build window..... Source: 0.17.1 from CVS checkout 02-jun-2001 ============================================================================ ==================== Cosmetic: c:\projekt\tn5250\linux\dbuffer.c(62) : warning C4101: 'n' : unreferenced local variable c:\projekt\tn5250\linux\dbuffer.c(103) : warning C4101: 'n' : unreferenced local variable c:\projekt\tn5250\linux\dbuffer.c(321) : warning C4101: 'r' : unreferenced local variable c:\projekt\tn5250\linux\dbuffer.c(321) : warning C4101: 'c' : unreferenced local variable ============================================================================ ==================== display.c in function: void tn5250_display_do_key(Tn5250Display *This, int key) .... tn5250_display_interactive_addch (This, key); ... void tn5250_display_interactive_addch(Tn5250Display * This, unsigned char ch) Result: c:\projekt\tn5250\linux\display.c(1029) : warning C4761: integral size mismatch in argument; conversion supplied change/cast line 1029 to: tn5250_display_interactive_addch (This, (unsigned char)key); ============================================================================ ==================== stream.c/h declaration in stream.h: extern Tn5250Stream *tn5250_stream_host(SOCKET_TYPE masterSock, long timeout, int streamtype); implementation in stream.c: Tn5250Stream *tn5250_stream_host(int masterfd, long timeout, int streamtype) Result: C:\Projekt\tn5250\Linux\stream.c(161) : warning C4028: formal parameter 1 different from declaration All sockets should be of type SOCKET_TYPE. ------ Missing declaration of tn3270_telnet_stream_init /* External declarations of initializers for each type of stream. */ extern int tn5250_telnet_stream_init (Tn5250Stream *This); extern int tn3270_telnet_stream_init (Tn5250Stream *This); <<--ADD THIS TO FIX Result: C:\Projekt\tn5250\Linux\stream.c(177) : error C4013: 'tn3270_telnet_stream_init' undefined; assuming extern returning int ============================================================================ ==================== telnetstr.c declaration: static int telnet_stream_accept(Tn5250Stream * This, SOCKET_TYPE masterSock); implementation: static int telnet_stream_accept(Tn5250Stream * This, int masterfd) Result: C:\Projekt\tn5250\Linux\telnetstr.c(456) : warning C4028: formal parameter 2 different from declaration All sockets should be of type SOCKET_TYPE. ------ This->options = This->options | (1 << sb_buf[i]+1); C:\Projekt\tn5250\Linux\telnetstr.c(878) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence Hmmm. You tell me, I don't know without reading the TN3270E specification if it should be (1 << (sb_buf[i]+1) ) ------ tn5250_buffer_append_byte(&out_buf, header.h3270.sequence >> 8); tn5250_buffer_append_byte(&out_buf, header.h3270.sequence & 0x00ff); C:\Projekt\tn5250\Linux\telnetstr.c(1282) : warning C4761: integral size mismatch in argument; conversion supplied C:\Projekt\tn5250\Linux\telnetstr.c(1283) : warning C4761: integral size mismatch in argument; conversion supplied void tn5250_buffer_append_byte( Tn5250Buffer* This, unsigned char b ) int sequence; Should be ( I think): tn5250_buffer_append_byte(&out_buf, (unsigned char)(header.h3270.sequence >> 8) ); ============================================================================ ==================== terminal.c void tn5250_terminal_beep (Tn5250Terminal *This) { return (* ((This)->beep)) ((This)); } C:\Projekt\tn5250\Linux\terminal.c(67) : warning C4098: 'tn5250_terminal_beep' : 'void' function returning a value ============================================================================ ==================== ============================================================================ ==================== Huge memory leak! I have not found any code that actually calls lib5250/tn5250_display_destroy() , and when I ported the code to WIN32, BoundsChecker filled my screen with memory leaks..... bomb_out: if (term != NULL) { tn5250_terminal_term(term); } // Add this code, ------------------------------------------------ // to release all the memory used by the display object, and the // terminal object, it's displaybuffer(s) a.s.o. if (display != NULL) { tn5250_display_destroy(display); // dbuffer(s), terminal } // -------------------------------------------------------------- if (sess != NULL) { tn5250_session_destroy(sess); } else if (stream != NULL) { tn5250_stream_destroy (stream); } if (config != NULL) tn5250_config_unref (config); ============================================================================ ==================== End of list (for now) ----- End forwarded message ----- -- Mike Madore Senior Software Engineer TurboLinux, Inc. (650)228-5203 +--- | This is the LINUX5250 Mailing List! | To submit a new message, send your mail to LINUX5250@midrange.com. | To subscribe to this list send email to LINUX5250-SUB@midrange.com. | To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.