Commit 4172bd88 authored by Tom Lane's avatar Tom Lane

Suppress some "variable might be clobbered by longjmp" warnings.

Seen with an older gcc version.  I'm not sure these represent any real
risk factor, but still a bit scary.  Anyway we have lots of other
volatile-marked variables in this code, so a couple more won't hurt.
parent dfe18f18
...@@ -37,7 +37,7 @@ static void ...@@ -37,7 +37,7 @@ static void
do_util_elog(int level, SV *msg) do_util_elog(int level, SV *msg)
{ {
MemoryContext oldcontext = CurrentMemoryContext; MemoryContext oldcontext = CurrentMemoryContext;
char *cmsg = NULL; char * volatile cmsg = NULL;
PG_TRY(); PG_TRY();
{ {
...@@ -67,6 +67,7 @@ static text * ...@@ -67,6 +67,7 @@ static text *
sv2text(SV *sv) sv2text(SV *sv)
{ {
char *str = sv2cstr(sv); char *str = sv2cstr(sv);
return cstring_to_text(str); return cstring_to_text(str);
} }
......
...@@ -1516,7 +1516,7 @@ static PLyProcedure * ...@@ -1516,7 +1516,7 @@ static PLyProcedure *
PLy_procedure_get(Oid fn_oid, bool is_trigger) PLy_procedure_get(Oid fn_oid, bool is_trigger)
{ {
HeapTuple procTup; HeapTuple procTup;
PLyProcedureEntry *entry; PLyProcedureEntry * volatile entry;
bool found; bool found;
procTup = SearchSysCache1(PROCOID, ObjectIdGetDatum(fn_oid)); procTup = SearchSysCache1(PROCOID, ObjectIdGetDatum(fn_oid));
...@@ -3234,7 +3234,7 @@ PLy_spi_prepare(PyObject *self, PyObject *args) ...@@ -3234,7 +3234,7 @@ PLy_spi_prepare(PyObject *self, PyObject *args)
void *tmpplan; void *tmpplan;
volatile MemoryContext oldcontext; volatile MemoryContext oldcontext;
volatile ResourceOwner oldowner; volatile ResourceOwner oldowner;
int nargs; volatile int nargs;
if (!PyArg_ParseTuple(args, "s|O", &query, &list)) if (!PyArg_ParseTuple(args, "s|O", &query, &list))
return NULL; return NULL;
...@@ -3470,7 +3470,7 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit) ...@@ -3470,7 +3470,7 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit)
PG_TRY(); PG_TRY();
{ {
char *nulls; char * volatile nulls;
volatile int j; volatile int j;
if (nargs > 0) if (nargs > 0)
......
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