Bug 118078 - 3 * used before set
Summary: 3 * used before set
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-11 20:03 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2004-03-12 17:57:15 UTC


Attachments (Terms of Use)

Description d.binderman 2004-03-11 20:03:11 UTC
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 09:35:34 UTC
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 13:22:17 UTC
>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 17:57:15 UTC
"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 19:31:23 UTC
>"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 16:07:51 UTC
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.