]> granicus.if.org Git - postgresql/commitdiff
Fix uninitialized-variable compiler warning induced by commit e4128ee76.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Dec 2017 16:25:17 +0000 (11:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 3 Dec 2017 16:25:17 +0000 (11:25 -0500)
I'm a little bit astonished that anyone's compiler would have failed to
complain about this.  The compiler surely does not know that is_procedure
means the function return value will be ignored.

src/pl/plpython/plpy_exec.c

index 4594a08eadb6d019c9fdbe985793eaf9d94f4570..1e0f3d9d3aeccb14fefea2d67f5c8e63e873ecc2 100644 (file)
@@ -210,6 +210,8 @@ PLy_exec_function(FunctionCallInfo fcinfo, PLyProcedure *proc)
                                ereport(ERROR,
                                                (errcode(ERRCODE_DATATYPE_MISMATCH),
                                                 errmsg("PL/Python procedure did not return None")));
+                       fcinfo->isnull = false;
+                       rv = (Datum) 0;
                }
                else if (proc->result.typoid == VOIDOID)
                {