Declaration of Variable with Unnecessarily Wide Scope

Properties


name
Declaration of Variable with Unnecessarily Wide Scope
definition
The source code declares a variable in one scope, but the variable is only used within a narrower scope.

Neighbors

CWE-1126 has no direct neighbors in this release.

Inferred Relationships

This page is experimental and may change significantly in future releases.

Related Countermeasure Techniques

No related defensive techniques in this release.

Related Weaknesses

Related Offensive Techniques

No related offensive techniques in this release.