Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 78479 - Bad source code
Summary: Bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: x3270
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
: 106312 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-24 10:42 UTC by d.binderman
Modified: 2007-04-18 16:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-07-05 12:01:19 UTC


Attachments (Terms of Use)

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 


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