Fix many clang errors in UIUC code
- because uiuc_warning_error always called exit(-1), it can be marked no return, so Clang realises that when it’s used in the ‘else’ side of a parsing test, uninitialised variables in the enclosing call site are safe. (Requires Simgear update to define SG_NO_RETURN helper)
This commit is contained in:
parent
dc17b5dda2
commit
c62b004438
2 changed files with 4 additions and 1 deletions
|
@ -118,6 +118,9 @@ void uiuc_warnings_errors(int errorCode, std::string line)
|
|||
exit(-1);
|
||||
break;
|
||||
}
|
||||
|
||||
cerr << "UIUC UNKNOWN ERROR" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// end uiuc_warnings_errors.cpp
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
#include <string>
|
||||
#include <cstdlib>
|
||||
|
||||
void uiuc_warnings_errors(int errorCode, std::string line);
|
||||
SG_NO_RETURN void uiuc_warnings_errors(int errorCode, std::string line);
|
||||
|
||||
#endif //_WARNINGS_ERRORS_H_
|
||||
|
|
Loading…
Add table
Reference in a new issue