Bug 118078 - 3 * used before set
3 * used before set
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: ghostscript (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-11 15:03 EST 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: 2004-03-12 12:57:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-03-11 15:03:11 EST
Description of problem:

I just tried to compile Fedora Core2 Test1 package ghostscript-7.07-19

The compiler said

1.

./src/gdevpsft.c(732): remark #592: variable "loca_checksum" is used
before its
value is set

The source code is

        offset = put_table(tab, "loca", loca_checksum[indexToLocFormat],
                           offset, loca_length);

but

    uint loca_length, loca_checksum[2];

Suggest init loca_checksum[ 0] or loca_checksum[ 1] before first use.

2.

./src/gdevlprn.c(60): remark #592: variable "ncode" is used before its
value is
set

The source code is

    int ncode;

    if (code < 0)
        return code;

    if ((code = param_write_bool(plist, "ManualFeed",
&lprn->ManualFeed)) < 0)
        code = ncode;

Suggest init ncode before first use.

3.

./src/gdevlx50.c(2155): remark #592: variable "pens" is used before
its value is set

The source code is

    nextLineToPrint     = pens[YELLOW_X][LO_PEN].finalLine;

but

    penData     pens[ NUM_COLOURS ][ PENS_PER_COLOUR ];

Suggest init pens 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 Tim Waugh 2004-03-12 04:35:34 EST
1. What to?
2. What to?
3. What to?

What are the bad symptoms that you see when using ghostscript?

Did you report this upstream, for example at
http://sourceforge.net/projects/ghostscript?
Comment 2 d.binderman 2004-03-12 08:22:17 EST
>1. What to? 2. What to? 3. What to?

I don't know.

In the absence of any further knowledge zero is a good bet.

>What are the bad symptoms that you see when using ghostscript?

None visible, because I haven't done enough testing to 
visit the bugs.

The code is clearly wrong - surely better to fix it before
a customer complains ?

>Did you report this upstream, for example 
>http://sourceforge.net/projects/ghostscript?

Sadly, no. I got this FC2 test 1 from Redhat, I kinda
figured they'd be interested in hearing about broken bits 
of code.

Comment 3 Tim Waugh 2004-03-12 12:57:15 EST
"Fixing" things without knowing the correct fix is worse than leaving
as-is.  These things need to be reported upstream.
Comment 4 d.binderman 2004-03-12 14:31:23 EST
>"Fixing" things without knowing the correct fix is worse than leaving
>as-is.

Fair enough. You are entitled to your opinion.

>These things need to be reported upstream.

I'm not bothered how the bugs get fixed, just so long
as they are fixed.

Feel free to report this upstream. 
 
Comment 5 David Binderman 2004-11-16 11:07:51 EST
Still broken in Fedora Core 3, some eight months later.

Seems a bit pointless reporting bugs if they don't get fixed.

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