MissouriMRDT / Autonomy_Software

Audit required: found a non-const global variable CXX-W2009
Anti-pattern
Minor
70 occurrences in this check
Found a non-const global variable 'bMainStop' which is prone to unpredictable changes
 24#endif
 25
 26// Create a boolean used to handle a SIGINT and exit gracefully.
 27volatile sig_atomic_t bMainStop = false; 28
 29/******************************************************************************
 30 * @brief Help function given to the C++ csignal standard library to run when
Found a non-const global variable 'bRunExampleFlag' which is prone to unpredictable changes
 16// If not included, define empty run example function and set bRunExampleFlag
 17// to false. If included, then define bRunExampleFlag as true.
 18#ifndef CHECK_IF_EXAMPLE_INCLUDED
 19static bool bRunExampleFlag = false; 20
 21void RunExample() {}
 22#else
Found a non-const global variable 'g_bRoveCommTCPStatus' which is prone to unpredictable changes
34
35    // RoveComm Status:
36    extern bool g_bRoveCommUDPStatus;
37    extern bool g_bRoveCommTCPStatus;38}    // namespace network
39
40#endif    // AUTONOMY_NETWORKING_H
Found a non-const global variable 'g_bRoveCommUDPStatus' which is prone to unpredictable changes
33    extern rovecomm::RoveCommTCP* g_pRoveCommTCPNode;    // Global RoveComm TCP Instance.
34
35    // RoveComm Status:
36    extern bool g_bRoveCommUDPStatus;37    extern bool g_bRoveCommTCPStatus;
38}    // namespace network
39
Found a non-const global variable 'g_pRoveCommTCPNode' which is prone to unpredictable changes
30{
31    // RoveComm Instances:
32    extern rovecomm::RoveCommUDP* g_pRoveCommUDPNode;    // Global RoveComm UDP Instance.
33    extern rovecomm::RoveCommTCP* g_pRoveCommTCPNode;    // Global RoveComm TCP Instance.34
35    // RoveComm Status:
36    extern bool g_bRoveCommUDPStatus;
Found a non-const global variable 'g_pRoveCommTCPNode' which is prone to unpredictable changes
30{
31    // RoveComm Instances:
32    extern rovecomm::RoveCommUDP* g_pRoveCommUDPNode;    // Global RoveComm UDP Instance.
33    extern rovecomm::RoveCommTCP* g_pRoveCommTCPNode;    // Global RoveComm TCP Instance.34
35    // RoveComm Status:
36    extern bool g_bRoveCommUDPStatus;
Found a non-const global variable 'g_pRoveCommUDPNode' which is prone to unpredictable changes
29namespace network
30{
31    // RoveComm Instances:
32    extern rovecomm::RoveCommUDP* g_pRoveCommUDPNode;    // Global RoveComm UDP Instance.33    extern rovecomm::RoveCommTCP* g_pRoveCommTCPNode;    // Global RoveComm TCP Instance.
34
35    // RoveComm Status:
Found a non-const global variable 'g_pRoveCommUDPNode' which is prone to unpredictable changes
29namespace network
30{
31    // RoveComm Instances:
32    extern rovecomm::RoveCommUDP* g_pRoveCommUDPNode;    // Global RoveComm UDP Instance.33    extern rovecomm::RoveCommTCP* g_pRoveCommTCPNode;    // Global RoveComm TCP Instance.
34
35    // RoveComm Status:
Found a non-const global variable 'g_bRoveCommTCPStatus' which is prone to unpredictable changes
37
38    // RoveComm Status:
39    bool g_bRoveCommUDPStatus = false;
40    bool g_bRoveCommTCPStatus = false;41}    // namespace network
Found a non-const global variable 'g_bRoveCommUDPStatus' which is prone to unpredictable changes
36    rovecomm::RoveCommTCP* g_pRoveCommTCPNode;
37
38    // RoveComm Status:
39    bool g_bRoveCommUDPStatus = false;40    bool g_bRoveCommTCPStatus = false;
41}    // namespace network
Found a non-const global variable 'g_pRoveCommTCPNode' which is prone to unpredictable changes
33{
34    // RoveComm Instances:
35    rovecomm::RoveCommUDP* g_pRoveCommUDPNode;
36    rovecomm::RoveCommTCP* g_pRoveCommTCPNode;37
38    // RoveComm Status:
39    bool g_bRoveCommUDPStatus = false;
Found a non-const global variable 'g_pRoveCommTCPNode' which is prone to unpredictable changes
33{
34    // RoveComm Instances:
35    rovecomm::RoveCommUDP* g_pRoveCommUDPNode;
36    rovecomm::RoveCommTCP* g_pRoveCommTCPNode;37
38    // RoveComm Status:
39    bool g_bRoveCommUDPStatus = false;
Found a non-const global variable 'g_pRoveCommUDPNode' which is prone to unpredictable changes
32namespace network
33{
34    // RoveComm Instances:
35    rovecomm::RoveCommUDP* g_pRoveCommUDPNode;36    rovecomm::RoveCommTCP* g_pRoveCommTCPNode;
37
38    // RoveComm Status:
Found a non-const global variable 'g_pRoveCommUDPNode' which is prone to unpredictable changes
32namespace network
33{
34    // RoveComm Instances:
35    rovecomm::RoveCommUDP* g_pRoveCommUDPNode;36    rovecomm::RoveCommTCP* g_pRoveCommTCPNode;
37
38    // RoveComm Status:
Found a non-const global variable 'g_szProgramStartTimeString' which is prone to unpredictable changes
 80    extern quill::LogLevel g_eFileLogLevel;
 81    extern quill::LogLevel g_eRoveCommLogLevel;
 82
 83    extern std::string g_szProgramStartTimeString; 84
 85    /////////////////////////////////////////
 86    // Declare namespace methods.
Found a non-const global variable 'g_eRoveCommLogLevel' which is prone to unpredictable changes
 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
 80    extern quill::LogLevel g_eFileLogLevel;
 81    extern quill::LogLevel g_eRoveCommLogLevel; 82
 83    extern std::string g_szProgramStartTimeString;
 84
Found a non-const global variable 'g_eFileLogLevel' which is prone to unpredictable changes
 77    extern quill::Logger* g_qRoveCommLogger;
 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
 80    extern quill::LogLevel g_eFileLogLevel; 81    extern quill::LogLevel g_eRoveCommLogLevel;
 82
 83    extern std::string g_szProgramStartTimeString;
Found a non-const global variable 'g_eConsoleLogLevel' which is prone to unpredictable changes
 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger;
 78
 79    extern quill::LogLevel g_eConsoleLogLevel; 80    extern quill::LogLevel g_eFileLogLevel;
 81    extern quill::LogLevel g_eRoveCommLogLevel;
 82
Found a non-const global variable 'g_qRoveCommLogger' which is prone to unpredictable changes
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger;
 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger; 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
 80    extern quill::LogLevel g_eFileLogLevel;
Found a non-const global variable 'g_qRoveCommLogger' which is prone to unpredictable changes
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger;
 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger; 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
 80    extern quill::LogLevel g_eFileLogLevel;
Found a non-const global variable 'g_qSharedLogger' which is prone to unpredictable changes
 73
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger;
 76    extern quill::Logger* g_qSharedLogger; 77    extern quill::Logger* g_qRoveCommLogger;
 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
Found a non-const global variable 'g_qSharedLogger' which is prone to unpredictable changes
 73
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger;
 76    extern quill::Logger* g_qSharedLogger; 77    extern quill::Logger* g_qRoveCommLogger;
 78
 79    extern quill::LogLevel g_eConsoleLogLevel;
Found a non-const global variable 'g_qConsoleLogger' which is prone to unpredictable changes
 72    /////////////////////////////////////////
 73
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger; 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger;
 78
Found a non-const global variable 'g_qConsoleLogger' which is prone to unpredictable changes
 72    /////////////////////////////////////////
 73
 74    extern quill::Logger* g_qFileLogger;
 75    extern quill::Logger* g_qConsoleLogger; 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger;
 78
Found a non-const global variable 'g_qFileLogger' which is prone to unpredictable changes
 71    // Declare namespace external variables and objects.
 72    /////////////////////////////////////////
 73
 74    extern quill::Logger* g_qFileLogger; 75    extern quill::Logger* g_qConsoleLogger;
 76    extern quill::Logger* g_qSharedLogger;
 77    extern quill::Logger* g_qRoveCommLogger;