Bug 116664 - subscript out of range + local variable used before set
Summary: subscript out of range + local variable used before set
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: xscreensaver
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-24 09:11 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-06-19 00:24:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2004-02-24 09:11:47 UTC
Description of problem:

I just tried to compile Core2 Test1 package xscreensaver-4.14-2

The compiler said

1.

analogtv.c(840): remark #592: variable "lineno" is used before its
value is set

The source code is

  int lineno;
  int i,j;
  double osc,filt;
  double *sp;
  double cbfc=1.0/128.0;

  sp = it->rx_signal + lineno*ANALOGTV_H + cur_hsync;

We can clearly see lineno is used before it is set. Suggest give it
a value before first use.

2.

blinkbox.c(289): warning #175: subscript out of range

The source code is

              bpos[2] = bbox.bottom.x - bscale[3];

but earlier in the file is

GLfloat bscale[3] = {1,1,0.25};

so bscale[3] doesn't exist.

3.

blinkbox.c(296): warning #175: subscript out of range
blinkbox.c(303): warning #175: subscript out of range
blinkbox.c(310): warning #175: subscript out of range
blinkbox.c(317): warning #175: subscript out of range
blinkbox.c(324): warning #175: subscript out of range

Duplicates.


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Alan Cox 2004-06-19 00:24:07 UTC
The first is code that is never executed, the second is harmless. You
might want to report this upstream to jwz instead.



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