1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +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:
Tom Lane
2013-03-28 13:19:49 -04:00
parent 473ab40c8b
commit 58bc48179b

View File

@ -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(); \
{ \