The compiler will show a warning when a variable is declared within a local scope and is not used elsewhere or is used before assigning a value.
- Why does that not apply to global variables?
- How can I find unused / unassigned global variables? Is there any other way for this other than Ctrl+F?