Bug 152888 - black-box-1.4.7-3: local variable used before set
Summary: black-box-1.4.7-3: local variable used before set
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: unspecified
Hardware: All SuSE Linux 10.1
: P5 - None : Normal
Target Milestone: ---
Assignee: Ladislav Michnovic
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-22 19:43 UTC by David Binderman
Modified: 2006-02-24 16:43 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2006-02-22 19:43:19 UTC
I just tried to compile package black-box-1.4.7-3 with the Intel C compiler.

It said

blackbox.c(663): warning #592: variable "crystal_num" is used before its value is set

The source code is

  int x,y,crystal_num;

  for (x=0;x<=10;x++){
    for (y=0;y<=8;y++){
      think[x][y]=0;
      light[x][y]=0;
    }
  }
  while ((crystal_num>difficulty*3)||(crystal_num<(difficulty-1)*3))

Suggest initialise local variable "crystal_num" before first use.
Comment 1 Ladislav Michnovic 2006-02-23 11:06:14 UTC
I'll take a closer look on the soruce code. Thak you for reporting this bug.
Comment 2 Ladislav Michnovic 2006-02-24 16:43:59 UTC
Fixed, patch submited.