mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03: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:
@ -380,12 +380,9 @@ ProcessUtility(Node *parsetree,
|
|||||||
*/
|
*/
|
||||||
#define UTILITY_BEGIN_QUERY(isComplete) \
|
#define UTILITY_BEGIN_QUERY(isComplete) \
|
||||||
do { \
|
do { \
|
||||||
bool _needCleanup = false; \
|
bool _needCleanup; \
|
||||||
\
|
\
|
||||||
if (isComplete) \
|
_needCleanup = (isComplete) && EventTriggerBeginCompleteQuery(); \
|
||||||
{ \
|
|
||||||
_needCleanup = EventTriggerBeginCompleteQuery(); \
|
|
||||||
} \
|
|
||||||
\
|
\
|
||||||
PG_TRY(); \
|
PG_TRY(); \
|
||||||
{ \
|
{ \
|
||||||
|
Reference in New Issue
Block a user