Welcome, Guest. Please login or register.

Author Topic: Please help me stop insane SASC warning 317  (Read 2327 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Please help me stop insane SASC warning 317
« on: September 09, 2004, 07:47:04 PM »
How do I stop all these insane warnings?

Do all C Compilers do this?  Or just SASC?

Code: [Select]

  int count,color[256],halfcolor[256];

// I put this loop here to try to
// stop jillions of 'possibly uninitialized variable "color"' warnings
// BUT IT HAS NO EFFECT!
  FOR (count=0;count<=256; count++) DO
     color[count]=0; halfcolor[count]=0;
  NEXT // count++


Here are the warnings I get when I compile with optimize=on

info.c 313 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 321 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 328 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 335 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 338 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 343 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 349 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 352 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 357 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 362 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 365 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 370 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 376 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 379 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 382 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 387 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 390 Warning 317: possibly uninitialized variable &quot;color&quot;
info.c 397 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 400 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 403 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 408 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 411 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 417 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 420 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 423 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 428 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;
info.c 431 Warning 317: possibly uninitialized variable &quot;halfcolor&quot;


I don't want to use ignore=317

I want to be warned about REAL possibly uninitialized variables.

color and halfcolor ARE initialized.

How can I stop these fake warnings without stopping the real
warnings?
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Please help me stop insane SASC warning 317
« Reply #1 on: September 13, 2004, 06:13:24 PM »
carefull PLEASE(!!!):
count < 256

u r correct.  silly me. :)  thanx
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Please help me stop insane SASC warning 317
« Reply #2 on: September 15, 2004, 04:03:58 PM »
@Trev

Thank u very much!  Problem solved thanx 2 ur professional insight.

I ur friend for life!   or 1 week, whichever comes first 8D
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA