Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show all replies
Re: Please help me stop insane SASC warning 317
« on: September 09, 2004, 07:57:59 PM »
color and halfcolor *aren't* initialized--they're only declared. You'll need to do something like this to get rid of the warning:

Code: [Select]

int count = 256, color[256] = {0}, halfcolor[256] = {0};

Or,
Code: [Select]

#define COUNT 256

fn()
{
    int color[COUNT] = {0}, halfcolor[COUNT] = {0};
}

Are FOR, DO, and NEXT SASC-specific macros? Using a standard C for-loop might disable the warning as well, but initializing the variables as part of the declaration should allow the compiler to do the optimization for you.

Trev