File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,15 @@ void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
43
43
std::cout << errmsg.toXML (true , 1 ) << std::endl;
44
44
}
45
45
46
- std::list<Check *> &Check::instances () {
46
+ std::list<Check *> &Check::instances ()
47
+ {
47
48
#ifdef __SVR4
48
- // Under Solaris, destructors are called in wrong order which causes a segmentation fault.
49
- // This fix ensures pointer remains valid and reachable until program terminates.
50
- static std::list<Check *> *_instances= new std::list<Check *>;
51
- return *_instances;
49
+ // Under Solaris, destructors are called in wrong order which causes a segmentation fault.
50
+ // This fix ensures pointer remains valid and reachable until program terminates.
51
+ static std::list<Check *> *_instances= new std::list<Check *>;
52
+ return *_instances;
52
53
#else
53
- static std::list<Check *> _instances;
54
- return _instances;
54
+ static std::list<Check *> _instances;
55
+ return _instances;
55
56
#endif
56
- }
57
+ }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class CPPCHECKLIB Check {
53
53
}
54
54
55
55
/* * List of registered check classes. This is used by Cppcheck to run checks and generate documentation */
56
- static std::list<Check *> &instances ();
56
+ static std::list<Check *> &instances ();
57
57
58
58
/* * run checks, the token list is not simplified */
59
59
virtual void runChecks (const Tokenizer *, const Settings *, ErrorLogger *) {
You can’t perform that action at this time.
0 commit comments