Commit 58bc4817 authored by Tom Lane's avatar Tom Lane

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.
parent 473ab40c
......@@ -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(); \
{ \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment