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 78461

Summary: bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: unitsAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
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: 2002-11-23 12:21:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description d.binderman 2002-11-23 12:21:46 UTC
Description of Problem:

Hello there,

I just tried to compile package units-1.74-4 from Redhat 8.0.

Here are some of the compiler messages.

units.c:1199: warning: suggest parentheses around comparison in operand of &
units.c:1514: warning: `sep' might be used uninitialized in this function
units.c:1514: warning: `right' might be used uninitialized in this function
units.c:1514: warning: `left' might be used uninitialized in this function

Here is a bunch of patches which fix the messages.

*** ./units.c.old	2002-11-05 13:47:48.000000000 +0000
--- ./units.c	2002-11-05 13:50:39.000000000 +0000
***************
*** 1196,1202 ****
     initializeunit(&outunit);
     if (err=completereduce(inunit))
       return err;
!    if ((n & 1==0) && (inunit->factor<0)) return E_NOTROOT;
     outunit.factor = pow(inunit->factor,1.0/(double)n);
     if (err = subunitroot(n, inunit->numerator, outunit.numerator))
       return err;
--- 1196,1202 ----
     initializeunit(&outunit);
     if (err=completereduce(inunit))
       return err;
!    if (((n & 1) == 0) && (inunit->factor<0)) return E_NOTROOT;
     outunit.factor = pow(inunit->factor,1.0/(double)n);
     if (err = subunitroot(n, inunit->numerator, outunit.numerator))
       return err;
***************
*** 1511,1517 ****
  {
     struct unittype invhave;
     int doingrec;  /* reciprocal conversion? */
!    char *sep, *right, *left;
  
     doingrec=0;
     havestr = removepadding(havestr);
--- 1511,1517 ----
  {
     struct unittype invhave;
     int doingrec;  /* reciprocal conversion? */
!    char *sep = 0, *right = 0, *left = 0;
  
     doingrec=0;
     havestr = removepadding(havestr);


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


How Reproducible:


Steps to Reproduce:
1. 
2. 
3. 

Actual Results:


Expected Results:


Additional Information:

Comment 1 Harald Hoyer 2002-11-25 10:36:48 UTC
already fixed in units-1.80 though not critical
thx anyway