Bug 121722 - 4 * local variable used before set
4 * local variable used before set
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: koffice (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Rockai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-26 15:17 EDT by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-03-22 10:12:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-04-26 15:17:52 EDT
Description of problem:

I just tried to compile Core2 Test2 package koffice-1.3-5.1

The compiler said

1.

kpresenter_view.cc(5111): warning #592: variable "result" is used
before its value is set

The source code is

    int result;

#if 0
	/* ... */
#endif
    if ( result != KS_CANCEL && result != KS_STOP )


Clearly broken code. Suggest re-work to avoid reading uninitialised
local variable.

2.

powerpoint.cc(1239): warning #592: variable "op" is used before its
value is set

The source code is

    Header op;
    Q_UINT32 length = 0;

    // Stop parsing when there are no more records. Note that we stop
as soon
    // as we cannot get a complete header.
    while (length + 8 <= bytes && op.type != 1000)//document

3.

xsltproc.cc(277): warning #592: variable "i" is used before its value
is set
xsltproc.cc(277): warning #592: variable "i" is used before its value
is set

The source code is

                        i++;

Suggest init i before first use.



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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Petr Rockai 2005-03-22 10:12:10 EST
This is broken, right. It is also fixed in current (kde) CVS and it doesn't  
seem that upstream intends to fix the stable branch at all in this respect.  
So i leave it as it is, doesn't seem to be particularly harmful. Expect this  
to be fixed in next stable upstream release (and a following fedora release).   

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