Bug 78479

Summary: Bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: x3270Assignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: d.binderman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-05 12:01:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2002-11-24 10:42:19 UTC
Description of Problem:

Hello there,

I just tried to compile package x3270-3.2.19-1 from Redhat 8.0.

Here are some of the compiler messages.

ft_dft.c:422: warning: operation on `obptr' may be undefined
qcpp.c:43: warning: `f' might be used uninitialized in this function
ft_dft.c:422: warning: operation on `obptr' may be undefined
ft_dft.c:422: warning: operation on `obptr' may be undefined

Here is a patch which fixes the messages.

*** ./3270ds.h.old	2002-11-06 12:36:44.000000000 +0000
--- ./3270ds.h	2002-11-06 12:41:05.000000000 +0000
***************
*** 281,288 ****
  #define MINUS1	0xffffffffU
  
  #define SET16(ptr, val) { \
! 	*((ptr)++) = ((val) & MASK16) >> 8; \
! 	*((ptr)++) = ((val) & MASK08); \
  }
  #define GET16(val, ptr) { \
  	(val) = *((ptr)+1); \
--- 281,290 ----
  #define MINUS1	0xffffffffU
  
  #define SET16(ptr, val) { \
! 	*(ptr) = ((val) & MASK16) >> 8; \
!         (ptr)++; \
! 	*(ptr) = ((val) & MASK08); \
!         (ptr)++;  \
  }
  #define GET16(val, ptr) { \
  	(val) = *((ptr)+1); \
*** ./qcpp.c.old	2002-11-06 12:32:48.000000000 +0000
--- ./qcpp.c	2002-11-06 12:33:03.000000000 +0000
***************
*** 40,46 ****
  {
  	int c;
  	char buf[1024];
! 	FILE *f, *t, *o;
  	int nest = 0;
  	int ln = 0;
  	int pass[MAX_NEST];
--- 40,46 ----
  {
  	int c;
  	char buf[1024];
! 	FILE *f = 0, *t, *o;
  	int nest = 0;
  	int ln = 0;
  	int pass[MAX_NEST];


Version-Release number of selected component (if applicable):


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Karsten Hopp 2002-11-25 09:28:22 UTC
I just recompiled x3270-3.2.19-1 with gcc-3.2-7 ithout any problems. 
Are you using a fresh install of Red Hat Linux 8.0 or one of the betas ? 
Please attach the output of  
rpm -qa | grep -e "gcc\|glibc" and gcc -v

Comment 2 Karsten Hopp 2003-10-29 13:03:58 UTC
Almost a year without an answer. Closing...

Comment 3 d.binderman 2003-10-29 18:10:22 UTC
>Almost a year without an answer. Closing...


Dear me. 

I used compiler flag "-Wall" to get the compiler messages. 

Comment 4 Miloslav Trmac 2004-02-06 18:35:38 UTC
*** Bug 106312 has been marked as a duplicate of this bug. ***

Comment 5 Miloslav Trmac 2004-02-06 18:36:43 UTC
Just a note: this is still a bug, even if it recompiles.
You never know what it compiles to.

Comment 6 Karsten Hopp 2004-07-05 12:01:19 UTC
part of it has been fixed upstream, rest is fixed in 
x3270-3.3.2.p1-5