MissouriMRDT / Autonomy_Software

Audit required: found a non-const global variable CXX-W2009
Anti-pattern
Minor
4 days ago14 days old
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;