---------- Forwarded message ----------
Date: Tue, 26 Feb 2002 10:59:46 +0100
From: Raimar Falke <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Does this feature exists?


Suppose I have the following code:

int foo(int m)
{
  int i, result = 0, j;

  for(i = 0; i < m; i++) {
    j = bar(i);
    foobar(j);
    result += j;
  }

  return result;
}

Can splint be instructed to produce an error message like:
  Warning: line 123: variable j is used only used in a deeper
  scope. The declaring of variable j can be moved in the scope
  starting at line 456.

If not: do you know any program which can do this?

        Raimar

-- 
 email: [EMAIL PROTECTED]
 "There are three ways to get something done. Do it yourself, hire someone
  to do it for you or forbid your kids to do it."


Reply via email to