Bug 111530

Summary: undefined source code
Product: [Fedora] Fedora Reporter: d.binderman
Component: x3270Assignee: Karsten Hopp <karsten>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: 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-01-14 14:16:58 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 2003-12-04 22:07:44 UTC
Description of problem:
I just tried to compile package x3270-3.2.20-4.2 from Fedora.

The compiler said

ft_dft.c:427: warning: operation on `obptr' may be undefined

The source code is

	SET16(obptr, bufptr-obptr+4);

Suggest either

. avoid obptr being part of both the two parameters

or 

. change the definition of the SET16 macro.


The definition of the SET16 macro is

#define SET16(ptr, val) { \
        *((ptr)++) = ((val) & MASK16) >> 8; \
        *((ptr)++) = ((val) & MASK08); \
}

This might be better.

#define SET16(ptr, val) { \
        ptr[ 0] = ((val) & MASK16) >> 8; \
		++ptr; \
        ptr[ 0] = ((val) & MASK08); \
		++ptr; \
}


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

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Karsten Hopp 2003-12-04 22:15:17 UTC
which compiler are you using ?  (rpm -q gcc; gcc --version) 
Do you get a similar error with the x3270-3.3.2-1 package from 
fedora/development ? 

Comment 2 d.binderman 2003-12-05 00:04:04 UTC
>which compiler are you using ?

This is not significant, but I am using gcc332 with flag -Wall.

It detects the undefined code in question.

>Do you get a similar error with the x3270-3.3.2-1 package from 
>fedora/development ?

I have no idea. 

If you want to prove that the bug is fixed in a later version, then 
I'm not stopping you.