Skip to content

Commit a63c84e

Browse files
committed
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
1 parent 8557a6f commit a63c84e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/backend/utils/adt/xml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3821,7 +3821,7 @@ SPI_sql_row_to_xmlelement(uint64 rownum, StringInfo result, char *tablename,
38213821
static text *
38223822
xml_xmlnodetoxmltype(xmlNodePtr cur, PgXmlErrorContext *xmlerrcxt)
38233823
{
3824-
xmltype *result;
3824+
xmltype *result = NULL;
38253825

38263826
if (cur->type != XML_ATTRIBUTE_NODE && cur->type != XML_TEXT_NODE)
38273827
{

src/pl/plperl/plperl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ PG_FUNCTION_INFO_V1(plperl_call_handler);
18401840
Datum
18411841
plperl_call_handler(PG_FUNCTION_ARGS)
18421842
{
1843-
Datum retval;
1843+
Datum retval = (Datum) 0;
18441844
plperl_call_data *volatile save_call_data = current_call_data;
18451845
plperl_interp_desc *volatile oldinterp = plperl_active_interp;
18461846
plperl_call_data this_call_data;

src/pl/plpython/plpy_exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ plpython_trigger_error_callback(void *arg)
10251025
static PyObject *
10261026
PLy_procedure_call(PLyProcedure *proc, const char *kargs, PyObject *vargs)
10271027
{
1028-
PyObject *rv;
1028+
PyObject *rv = NULL;
10291029
int volatile save_subxact_level = list_length(explicit_subtransactions);
10301030

10311031
PyDict_SetItemString(proc->globals, kargs, vargs);

src/pl/plpython/plpy_typeio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ PLyObject_ToBytea(PLyObToDatum *arg, PyObject *plrv,
901901
bool *isnull, bool inarray)
902902
{
903903
PyObject *volatile plrv_so = NULL;
904-
Datum rv;
904+
Datum rv = (Datum) 0;
905905

906906
if (plrv == Py_None)
907907
{

src/pl/tcl/pltcl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ pltclu_call_handler(PG_FUNCTION_ARGS)
718718
static Datum
719719
pltcl_handler(PG_FUNCTION_ARGS, bool pltrusted)
720720
{
721-
Datum retval;
721+
Datum retval = (Datum) 0;
722722
pltcl_call_state current_call_state;
723723
pltcl_call_state *save_call_state;
724724

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