Skip to content

Commit 1f115d9

Browse files
committed
Suppress volatile-related warning seen in some compilers.
Antique versions of gcc complain about vars that are initialized outside PG_TRY and then modified within it. Rather than marking the var volatile, expend one more line of code.
1 parent 31c7c64 commit 1f115d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pl/plpgsql/src/pl_handler.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ plpgsql_call_handler(PG_FUNCTION_ARGS)
9191
{
9292
PLpgSQL_function *func;
9393
PLpgSQL_execstate *save_cur_estate;
94-
Datum retval = 0; /* make compiler happy */
94+
Datum retval;
9595
int rc;
9696

9797
/*
@@ -119,8 +119,11 @@ plpgsql_call_handler(PG_FUNCTION_ARGS)
119119
retval = PointerGetDatum(plpgsql_exec_trigger(func,
120120
(TriggerData *) fcinfo->context));
121121
else if (CALLED_AS_EVENT_TRIGGER(fcinfo))
122+
{
122123
plpgsql_exec_event_trigger(func,
123124
(EventTriggerData *) fcinfo->context);
125+
retval = (Datum) 0;
126+
}
124127
else
125128
retval = plpgsql_exec_function(func, fcinfo);
126129
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy