Bug 78479 - Bad source code
Bad source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: x3270 (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
:
: 106312 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-24 05:42 EST by d.binderman
Modified: 2007-04-18 12:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-05 08:01:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-11-24 05:42:19 EST
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 04:28:22 EST
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 08:03:58 EST
Almost a year without an answer. Closing...
Comment 3 d.binderman 2003-10-29 13:10:22 EST
>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 13:35:38 EST
*** Bug 106312 has been marked as a duplicate of this bug. ***
Comment 5 Miloslav Trmac 2004-02-06 13:36:43 EST
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 08:01:19 EDT
part of it has been fixed upstream, rest is fixed in 
x3270-3.3.2.p1-5 

Note You need to log in before you can comment on or make changes to this bug.