mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Change return type of ExceptionalCondition to void and mark it noreturn
In ancient times, it was thought that this wouldn't work because of TrapMacro/AssertMacro, but changing those to use a comma operator appears to work without compiler warnings.
This commit is contained in:
@@ -21,11 +21,8 @@
|
||||
|
||||
/*
|
||||
* ExceptionalCondition - Handles the failure of an Assert()
|
||||
*
|
||||
* Note: this can't actually return, but we declare it as returning int
|
||||
* because the TrapMacro() macro might get wonky otherwise.
|
||||
*/
|
||||
int
|
||||
void
|
||||
ExceptionalCondition(const char *conditionName,
|
||||
const char *errorType,
|
||||
const char *fileName,
|
||||
@@ -55,6 +52,4 @@ ExceptionalCondition(const char *conditionName,
|
||||
#endif
|
||||
|
||||
abort();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user