Make CANT_HAPPEN() more obvious for static analysis
Local analysis can now easily find out what's up. Before, whole-program analysis was required. The Clang Static Analyzer complained about code that is actually fine.
This commit is contained in:
parent
ad80846283
commit
9061ae7b9d
2 changed files with 5 additions and 8 deletions
|
@ -126,16 +126,13 @@ logerror(char *format, ...)
|
|||
}
|
||||
|
||||
/*
|
||||
* Log internal error MSG occured in FILE:LINE.
|
||||
* Call oops handler, and if it returns, return 1.
|
||||
* Oops handler defaults to abort().
|
||||
* Log internal error MSG occured in FILE:LINE, call oops handler.
|
||||
*/
|
||||
int
|
||||
void
|
||||
oops(char *msg, char *file, int line)
|
||||
{
|
||||
logerror("Oops: %s in %s:%d", msg ? msg : "bug", file, line);
|
||||
oops_handler();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue