Commit a63c84e5 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix some compiler warnings on older compilers

Some older compilers appear to not understand the recently introduced
PG_FINALLY code structure that well in some circumstances and complain
about possibly uninitialized variables.  So to fix, initialize the
variables explicitly in the cases complained about.

Discussion: https://www.postgresql.org/message-id/flat/95a822c3-728b-af0e-d7e5-71890507ae0c%402ndquadrant.com
parent 8557a6f1
......@@ -3821,7 +3821,7 @@ SPI_sql_row_to_xmlelement(uint64 rownum, StringInfo result, char *tablename,
static text *
xml_xmlnodetoxmltype(xmlNodePtr cur, PgXmlErrorContext *xmlerrcxt)
{
xmltype *result;
xmltype *result = NULL;
if (cur->type != XML_ATTRIBUTE_NODE && cur->type != XML_TEXT_NODE)
{
......
......@@ -1840,7 +1840,7 @@ PG_FUNCTION_INFO_V1(plperl_call_handler);
Datum
plperl_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
Datum retval = (Datum) 0;
plperl_call_data *volatile save_call_data = current_call_data;
plperl_interp_desc *volatile oldinterp = plperl_active_interp;
plperl_call_data this_call_data;
......
......@@ -1025,7 +1025,7 @@ plpython_trigger_error_callback(void *arg)
static PyObject *
PLy_procedure_call(PLyProcedure *proc, const char *kargs, PyObject *vargs)
{
PyObject *rv;
PyObject *rv = NULL;
int volatile save_subxact_level = list_length(explicit_subtransactions);
PyDict_SetItemString(proc->globals, kargs, vargs);
......
......@@ -901,7 +901,7 @@ PLyObject_ToBytea(PLyObToDatum *arg, PyObject *plrv,
bool *isnull, bool inarray)
{
PyObject *volatile plrv_so = NULL;
Datum rv;
Datum rv = (Datum) 0;
if (plrv == Py_None)
{
......
......@@ -718,7 +718,7 @@ pltclu_call_handler(PG_FUNCTION_ARGS)
static Datum
pltcl_handler(PG_FUNCTION_ARGS, bool pltrusted)
{
Datum retval;
Datum retval = (Datum) 0;
pltcl_call_state current_call_state;
pltcl_call_state *save_call_state;
......
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