Main Content
Global Variables
Description and example of global variable categories
A Polyspace® Code Prover™ analysis checks global variables in a C/C++ program and determines if the variables are shared between multiple tasks (threads) or unshared.
For shared variables, the analysis attempts to prove that the variables are protected from concurrent access.
For unshared variables, the analysis determines if the variables are used or unused.
Polyspace Results
Shared variable | Global variables shared between multiple tasks and protected from concurrent access by the tasks |
Potentially unprotected
variable | Global variables shared between multiple tasks but not protected from concurrent access by the tasks |
Used non-shared
variable | Global variables used in a single task |
Unused variable | Global variables declared but not used |