Bug 110825 - bad source code
Summary: bad source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: inn
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-24 17:11 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-16 13:13:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-11-24 17:11:06 UTC
Description of problem:

I just tried to compile package inn-2_3_5-6 from Fedora.

The compiler said

1.

cnfs.c(1334): remark #592: variable "middle" is used before its value 
is set
cnfs.c(1335): remark #592: variable "limit" is used before its value 
is set

The source code is

        strcpy(buf2, CNFSofft2hex(middle, FALSE));
        strcpy(buf3, CNFSofft2hex(limit, FALSE));

But both middle & limit have no initialiser since their declaration.

2.

misc.c(379): remark #592: variable "hash" is used before its value is 
set
misc.c(382): remark #592: variable "token" is used before its value 
is set

The source code is

        sprintf(buff, "[%s]%c%lu%c%lu%c%lu%c%s\n", HashToText(hash),
                HIS_FIELDSEP, dummy, HIS_SUBFIELDSEP,
                dummy, HIS_SUBFIELDSEP,
                dummy, HIS_FIELDSEP, TokenToText(token));

Here again, has & token have not been initialised before use.

3.

perl.c(292): remark #1011: missing return statement at end of non-
void function
"perlAuthInit"

Self explanatory. Missing return statement.

4.

post.c(1212): remark #592: variable "result" is used before its value 
is set

The source code is

        if (result != EOF) {

More missing initialisers.


Version-Release number of selected component (if applicable):
inn-2_3_5-6 

How reproducible:


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


Expected results:


Additional info:

Comment 1 Martin Stransky 2004-11-08 15:47:01 UTC
What kind of compiler do you use?

Comment 2 David Binderman 2004-11-20 10:06:58 UTC
>What kind of compiler do you use?

Intel 8.1 - it's much better than gcc for finding bugs - see above.



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