mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
Avoid "variable might be clobbered by longjmp" warning.
On older-model gcc, the original coding of UTILITY_BEGIN_QUERY() can draw this error because of multiple assignments to _needCleanup. Rather than mark that variable volatile, we can suppress the warning by arranging to have just one unconditional assignment before PG_TRY.
This commit is contained in:
parent
473ab40c8b
commit
58bc48179b
@ -380,12 +380,9 @@ ProcessUtility(Node *parsetree,
|
||||
*/
|
||||
#define UTILITY_BEGIN_QUERY(isComplete) \
|
||||
do { \
|
||||
bool _needCleanup = false; \
|
||||
bool _needCleanup; \
|
||||
\
|
||||
if (isComplete) \
|
||||
{ \
|
||||
_needCleanup = EventTriggerBeginCompleteQuery(); \
|
||||
} \
|
||||
_needCleanup = (isComplete) && EventTriggerBeginCompleteQuery(); \
|
||||
\
|
||||
PG_TRY(); \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user